import source from 1.3.40
[external/swig.git] / Examples / chicken / constants / test-constants.scm
1 ;; feel free to uncomment and comment sections
2
3 (load-library 'example "./constants.so")
4
5 (display "starting test ... you will see 'finished' if successful.\n")
6 (or (= (ICONST) 42) (exit 1))
7 (or (< (abs (- (FCONST) 2.1828)) 0.00001) (exit 1))
8 (or (char=? (CCONST) #\x) (exit 1))
9 (or (char=? (CCONST2) #\newline) (exit 1))
10 (or (string=? (SCONST) "Hello World") (exit 1))
11 (or (string=? (SCONST2) "\"Hello World\"") (exit 1))
12 (or (< (abs (- (EXPR) (+ (ICONST) (* 3 (FCONST))))) 0.00001) (exit 1))
13 (or (= (iconstX) 37) (exit 1))
14 (or (< (abs (- (fconstX) 3.14)) 0.00001) (exit 1))
15 (display "finished test.\n")
16 (exit 0)