diff options
Diffstat (limited to 'trunk/Examples/test-suite/python/using_composition_runme.py')
-rw-r--r-- | trunk/Examples/test-suite/python/using_composition_runme.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/trunk/Examples/test-suite/python/using_composition_runme.py b/trunk/Examples/test-suite/python/using_composition_runme.py new file mode 100644 index 000000000..6baa16d13 --- /dev/null +++ b/trunk/Examples/test-suite/python/using_composition_runme.py @@ -0,0 +1,34 @@ +from using_composition import * + +f = FooBar() +if f.blah(3) != 3: + raise RuntimeError,"FooBar::blah(int)" + +if f.blah(3.5) != 3.5: + raise RuntimeError,"FooBar::blah(double)" + +if f.blah("hello") != "hello": + raise RuntimeError,"FooBar::blah(char *)" + + +f = FooBar2() +if f.blah(3) != 3: + raise RuntimeError,"FooBar2::blah(int)" + +if f.blah(3.5) != 3.5: + raise RuntimeError,"FooBar2::blah(double)" + +if f.blah("hello") != "hello": + raise RuntimeError,"FooBar2::blah(char *)" + + +f = FooBar3() +if f.blah(3) != 3: + raise RuntimeError,"FooBar3::blah(int)" + +if f.blah(3.5) != 3.5: + raise RuntimeError,"FooBar3::blah(double)" + +if f.blah("hello") != "hello": + raise RuntimeError,"FooBar3::blah(char *)" + |