PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
MATLAB | 39 lines | 24 code | 15 blank | 0 comment | 6 complexity | 40096acabe1886128579aaddb08eff35 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. smart_pointer_member
  2. f = Foo();
  3. f.y = 1;
  4. if (f.y != 1)
  5. error
  6. endif
  7. b = Bar(f);
  8. b.y = 2;
  9. if (f.y != 2)
  10. error("f.y = %i, b.y = %i",f.y,b.y)
  11. endif
  12. if (swig_this(b.x) != swig_this(f.x))
  13. error
  14. endif
  15. if (b.z != f.z)
  16. error
  17. endif
  18. try
  19. if (Foo.z == Bar.z)
  20. error
  21. endif
  22. error
  23. catch
  24. end_try_catch