PageRenderTime 46ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Lisp | 26 lines | 20 code | 6 blank | 0 comment | 0 complexity | 7af0a0e1ba48efa34860177d69b5834e MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. (define p (test "test"))
  2. (if (not (string=? p "test"))
  3. (error "test failed!"))
  4. (set! p (test-pconst "test"))
  5. (if (not (string=? p "test_pconst"))
  6. (error "test_pconst failed!"))
  7. (define f (new-Foo))
  8. (set! p (Foo-test f "test"))
  9. (if (not (string=? p "test"))
  10. (error "member-test failed!"))
  11. (set! p (Foo-test-pconst f "test"))
  12. (if (not (string=? p "test_pconst"))
  13. (error "member-test_pconst failed!"))
  14. (set! p (Foo-test-constm f "test"))
  15. (if (not (string=? p "test_constmethod"))
  16. (error "member-test_constm failed!"))
  17. (set! p (Foo-test-pconstm f "test"))
  18. (if (not (string=? p "test_pconstmethod"))
  19. (error "member-test_pconstm failed!"))
  20. (exit 0)