diff options
Diffstat (limited to 'Examples/test-suite/octave/using_composition_runme.m')
| -rw-r--r-- | Examples/test-suite/octave/using_composition_runme.m | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Examples/test-suite/octave/using_composition_runme.m b/Examples/test-suite/octave/using_composition_runme.m new file mode 100644 index 0000000..9b58d6d --- /dev/null +++ b/Examples/test-suite/octave/using_composition_runme.m @@ -0,0 +1,43 @@ +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 + |
