PageRenderTime 45ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/octave/constructor_copy_runme.m

#
MATLAB | 44 lines | 31 code | 13 blank | 0 comment | 6 complexity | 8800d5f7129c83ed14344e163b3f5950 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. constructor_copy
  2. f1 = Foo1(3);
  3. f11 = Foo1(f1);
  4. if (f1.x != f11.x)
  5. error
  6. endif
  7. f8 = Foo8();
  8. try
  9. f81 = Foo8(f8);
  10. good = 0;
  11. catch
  12. good = 1;
  13. end_try_catch
  14. if (!good)
  15. error
  16. endif
  17. bi = Bari(5);
  18. bc = Bari(bi);
  19. if (bi.x != bc.x)
  20. error
  21. endif
  22. bd = Bard(5);
  23. try
  24. bc = Bard(bd);
  25. good = 0;
  26. catch
  27. good = 1;
  28. end_try_catch
  29. if (!good)
  30. error
  31. endif