/trunk/Examples/test-suite/octave/using_composition_runme.m
MATLAB | 43 lines | 31 code | 12 blank | 0 comment | 9 complexity | eec2b86d739001e9f7592dad8080449a MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- using_composition
- f = FooBar();
- if (f.blah(3) != 3)
- error("FooBar::blah(int)")
- endif
- if (f.blah(3.5) != 3.5)
- error("FooBar::blah(double)")
- endif
- if (!strcmp(f.blah("hello"),"hello"))
- error("FooBar::blah(char *)")
- endif
- f = FooBar2();
- if (f.blah(3) != 3)
- error("FooBar2::blah(int)")
- endif
- if (f.blah(3.5) != 3.5)
- error("FooBar2::blah(double)")
- endif
- if (!strcmp(f.blah("hello"),"hello"))
- error("FooBar2::blah(char *)")
- endif
- f = FooBar3();
- if (f.blah(3) != 3)
- error("FooBar3::blah(int)")
- endif
- if (f.blah(3.5) != 3.5)
- error("FooBar3::blah(double)")
- endif
- if (!strcmp(f.blah("hello"),"hello"))
- error("FooBar3::blah(char *)")
- endif