PageRenderTime 42ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Examples/test-suite/tcl/imports_runme.tcl

#
TCL | 19 lines | 15 code | 3 blank | 1 comment | 4 complexity | 8de9dd8802ec112a7ed5e1dc987727cc 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. if [ catch { load ./imports_b[info sharedlibextension] imports_b} err_msg ] {
  3. puts stderr "Could not load shared object:\n$err_msg"
  4. exit 1
  5. }
  6. if [ catch { load ./imports_a[info sharedlibextension] imports_a} err_msg ] {
  7. puts stderr "Could not load shared object:\n$err_msg"
  8. exit 1
  9. }
  10. set x [new_B]
  11. A_hello $x
  12. if [ catch { $x nonexistant } ] {
  13. } else {
  14. puts stderr "nonexistant method did not throw exception\n"
  15. exit 1
  16. }