swig/SWIG/Examples/chicken/constants/test-constants.scm
Jonah Beckford 85ace8facd Initial addition.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4313 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-15 01:56:34 +00:00

15 lines
705 B
Scheme

;; run with './constants test-constants.scm'
;; feel free to uncomment and comment sections
(display "starting test ... you will see 'finished' if successful.\n")
(or (= (example-ICONST) 42) (exit 1))
(or (< (abs (- (example-FCONST) 2.1828)) 0.00001) (exit 1))
(or (char=? (example-CCONST) #\x) (exit 1))
(or (char=? (example-CCONST2) #\newline) (exit 1))
(or (string=? (example-SCONST) "Hello World") (exit 1))
(or (string=? (example-SCONST2) "\"Hello World\"") (exit 1))
(or (< (abs (- (example-EXPR) (+ (example-ICONST) (* 3 (example-FCONST))))) 0.00001) (exit 1))
(or (= (example-iconstX) 37) (exit 1))
(or (< (abs (- (example-fconstX) 3.14)) 0.00001) (exit 1))
(display "finished test.\n")
(exit 0)