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

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

#
MATLAB | 27 lines | 21 code | 6 blank | 0 comment | 6 complexity | a8b269d0ea8d74d18e970a03a4fbef35 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. smart_pointer_overload
  2. f = Foo();
  3. b = Bar(f);
  4. if (f.test(3) != 1)
  5. error
  6. endif
  7. if (f.test(3.5) != 2)
  8. error
  9. endif
  10. if (f.test("hello") != 3)
  11. error
  12. endif
  13. if (b.test(3) != 1)
  14. error
  15. endif
  16. if (b.test(3.5) != 2)
  17. error
  18. endif
  19. if (b.test("hello") != 3)
  20. error
  21. endif