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

# · MATLAB · 27 lines · 21 code · 6 blank · 0 comment · 4 complexity · 01f6706d049e86f5d9f06d48dd17525a MD5 · raw file

  1. typedef_inherit
  2. a = typedef_inherit.Foo();
  3. b = typedef_inherit.Bar();
  4. x = typedef_inherit.do_blah(a);
  5. if (!strcmp(x,"Foo::blah"))
  6. error("Whoa! Bad return", x)
  7. endif
  8. x = typedef_inherit.do_blah(b);
  9. if (!strcmp(x,"Bar::blah"))
  10. error("Whoa! Bad return", x)
  11. endif
  12. c = typedef_inherit.Spam();
  13. d = typedef_inherit.Grok();
  14. x = typedef_inherit.do_blah2(c);
  15. if (!strcmp(x,"Spam::blah"))
  16. error("Whoa! Bad return", x)
  17. endif
  18. x = typedef_inherit.do_blah2(d);
  19. if (!strcmp(x,"Grok::blah"))
  20. error("Whoa! Bad return", x)
  21. endif