PageRenderTime 15ms CodeModel.GetById 11ms app.highlight 3ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Examples/test-suite/schemerunme/cpp_namespace.scm

#
Lisp | 42 lines | 28 code | 13 blank | 1 comment | 0 complexity | c60698bb580d94e7c9202b963566f55c MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1(define n (fact 4))
 2(if (not (= n 24))
 3    (error "Bad return value!"))
 4
 5(if (not (= (Foo) 42))
 6    (error "bad variable value!"))
 7
 8(define t (new-Test))
 9(if (not (string=? (Test-method t) "Test::method"))
10    (error "Bad method return value!"))
11
12(if (not (string=? (do-method t) "Test::method"))
13    (error "Bad return value!"))
14
15(if (not (string=? (do-method2 t) "Test::method"))
16    (error "Bad return value!"))
17
18(weird "hello" 4)
19
20;; (delete-Test t)
21
22(define t2 (new-Test2))
23(define t3 (new-Test3))
24(define t4 (new-Test4))
25(define t5 (new-Test5))
26
27(if (not (= (foo3 42) 42))
28    (error "Bad return value!"))
29
30(if (not (string=? (do-method3 t2 40) "Test2::method"))
31    (error "bad return value!"))
32
33(if (not (string=? (do-method3 t3 40) "Test3::method"))
34    (error "bad return value"))
35
36(if (not (string=? (do-method3 t4 40) "Test4::method"))
37    (error "bad return value"))
38
39(if (not (string=? (do-method3 t5 40) "Test5::method"))
40    (error "bad return value"))
41
42(exit 0)