import source from 1.3.40
[external/swig.git] / Examples / test-suite / schemerunme / overload_complicated.scm
1 (define-macro (check form)
2   `(if (not ,form)
3        (error "Check failed: " ',form)))
4
5 (define (=~ a b)
6   (< (abs (- a b)) 1e-8))
7
8 ;; Check first method
9 (check (=~ (foo 1 2 "bar" 4) 15))
10
11 ;; Check second method
12 (check (=~ (foo 1 2) 4811.4))
13 (check (=~ (foo 1 2 3.2) 4797.2))
14 (check (=~ (foo 1 2 3.2 #\Q) 4798.2))
15
16 (exit 0)