PageRenderTime 36ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
TCL | 22 lines | 18 code | 3 blank | 1 comment | 4 complexity | daf9ea0bbe3593717d30cb5defc06aa3 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. # This is the imports runtime testcase.
  2. proc import {} {
  3. if [ catch { load ./imports_b[info sharedlibextension] imports_b} err_msg ] {
  4. puts stderr "Could not load shared object:\n$err_msg"
  5. exit 1
  6. }
  7. if [ catch { load ./imports_a[info sharedlibextension] imports_a} err_msg ] {
  8. puts stderr "Could not load shared object:\n$err_msg"
  9. exit 1
  10. }
  11. }
  12. import
  13. set x [new_B]
  14. A_hello $x
  15. if [ catch { $x nonexistant } ] {
  16. } else {
  17. puts stderr "nonexistant method did not throw exception\n"
  18. exit 1
  19. }