PageRenderTime 32ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
MATLAB | 17 lines | 13 code | 4 blank | 0 comment | 2 complexity | ac25c0bda3c45d44b683aa6bdb09de65 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. smart_pointer_multi
  2. f = Foo();
  3. b = Bar(f);
  4. s = Spam(b);
  5. g = Grok(b);
  6. s.x = 3;
  7. if (s.getx() != 3)
  8. error
  9. endif
  10. g.x = 4;
  11. if (g.getx() != 4)
  12. error
  13. endif