PageRenderTime 39ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
MATLAB | 30 lines | 27 code | 3 blank | 0 comment | 8 complexity | 9ab3e76f4ca820c2edac52f1089eb1be MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. overload_extendc
  2. f = overload_extendc.Foo();
  3. if (f.test(3) != 1)
  4. error
  5. endif
  6. if (f.test("hello") != 2)
  7. error
  8. endif
  9. if (f.test(3.5,2.5) != 3)
  10. error
  11. endif
  12. if (f.test("hello",20) != 1020)
  13. error
  14. endif
  15. if (f.test("hello",20,100) != 120)
  16. error
  17. endif
  18. # C default args
  19. if (f.test(f) != 30)
  20. error
  21. endif
  22. if (f.test(f,100) != 120)
  23. error
  24. endif
  25. if (f.test(f,100,200) != 300)
  26. error
  27. endif