PageRenderTime 69ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/tcl/newobject1_runme.tcl

#
TCL | 28 lines | 13 code | 3 blank | 12 comment | 5 complexity | 53266bc0e0e240d4b435acdbf7a1d72b MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. if [ catch { load ./newobject1[info sharedlibextension] newobject1} err_msg ] {
  2. puts stderr "Could not load shared object:\n$err_msg"
  3. }
  4. set foo1 [Foo_makeFoo]
  5. if {[Foo_fooCount] != 1} {
  6. puts stderr "newobject1 test 1 failed"
  7. exit 1
  8. }
  9. set foo2 [$foo1 makeMore]
  10. if {[Foo_fooCount] != 2} {
  11. puts stderr "newobject1 test 2 failed"
  12. exit 1
  13. }
  14. # Disable test while we solve the problem of premature object deletion
  15. #$foo1 -delete
  16. #if {[Foo_fooCount] != 1} {
  17. # puts stderr "newobject1 test 3 failed"
  18. # exit 1
  19. #}
  20. #
  21. #$foo2 -delete
  22. #if {[Foo_fooCount] != 0} {
  23. # puts stderr "newobject1 test 4 failed"
  24. # exit 1
  25. #}