PageRenderTime 40ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
MATLAB | 41 lines | 26 code | 15 blank | 0 comment | 6 complexity | 80e07596ed737386efb8df87a3e9fb94 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. smart_pointer_extend
  2. f = Foo();
  3. b = Bar(f);
  4. if (b.extension() != f.extension())
  5. error
  6. endif
  7. b = CBase();
  8. d = CDerived();
  9. p = CPtr();
  10. if (b.bar() != p.bar())
  11. error
  12. endif
  13. if (d.foo() != p.foo())
  14. error
  15. endif
  16. if (b.hello() != p.hello())
  17. error
  18. endif
  19. d = DFoo();
  20. dp = DPtrFoo(d);
  21. if (d.SExt(1) != dp.SExt(1))
  22. error
  23. endif
  24. if (d.Ext(1) != dp.Ext(1))
  25. error
  26. endif