git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7155 626c5289-ae23-0410-ae9c-e8d60b6d4f22
15 lines
284 B
Scheme
15 lines
284 B
Scheme
(define-macro (check test)
|
|
`(if (not ,test) (error "Error in test" ',test)))
|
|
|
|
(define b (make <Bar>))
|
|
(check (= (bar b) 1))
|
|
|
|
(define f (make <Foo>))
|
|
(check (= (foo f) 2))
|
|
|
|
(define fb (make <FooBar>))
|
|
(check (= (bar fb) 1))
|
|
(check (= (foo fb) 2))
|
|
(check (= (fooBar fb) 3))
|
|
|
|
(exit 0)
|