summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/template_default_arg_runme.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/python/template_default_arg_runme.py')
-rw-r--r--Examples/test-suite/python/template_default_arg_runme.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/Examples/test-suite/python/template_default_arg_runme.py b/Examples/test-suite/python/template_default_arg_runme.py
index 91b1e0e8c..e9ef00f99 100644
--- a/Examples/test-suite/python/template_default_arg_runme.py
+++ b/Examples/test-suite/python/template_default_arg_runme.py
@@ -7,25 +7,25 @@ helloInt.foo(template_default_arg.Hello_int.hi)
x = template_default_arg.X_int()
if (x.meth(20.0, 200) != 200):
- raise RuntimeError, ("X_int test 1 failed")
+ raise RuntimeError(("X_int test 1 failed"))
if (x.meth(20) != 20):
- raise RuntimeError, ("X_int test 2 failed")
+ raise RuntimeError(("X_int test 2 failed"))
if (x.meth() != 0):
- raise RuntimeError, ("X_int test 3 failed")
+ raise RuntimeError(("X_int test 3 failed"))
y = template_default_arg.Y_unsigned()
if (y.meth(20.0, 200) != 200):
- raise RuntimeError, ("Y_unsigned test 1 failed")
+ raise RuntimeError(("Y_unsigned test 1 failed"))
if (y.meth(20) != 20):
- raise RuntimeError, ("Y_unsigned test 2 failed")
+ raise RuntimeError(("Y_unsigned test 2 failed"))
if (y.meth() != 0):
- raise RuntimeError, ("Y_unsigned test 3 failed")
+ raise RuntimeError(("Y_unsigned test 3 failed"))
x = template_default_arg.X_longlong()
x = template_default_arg.X_longlong(20.0)
-x = template_default_arg.X_longlong(20.0, 200L)
+x = template_default_arg.X_longlong(20.0, 200)
x = template_default_arg.X_int()
@@ -54,40 +54,40 @@ fzc = x.meth(fz)
# plain function: int ott(Foo<int>)
if (template_default_arg.ott(template_default_arg.Foo_int()) != 30):
- raise RuntimeError, ("ott test 1 failed")
+ raise RuntimeError(("ott test 1 failed"))
# %template(ott) ott<int, int>
if (template_default_arg.ott() != 10):
- raise RuntimeError, ("ott test 2 failed")
+ raise RuntimeError(("ott test 2 failed"))
if (template_default_arg.ott(1) != 10):
- raise RuntimeError, ("ott test 3 failed")
+ raise RuntimeError(("ott test 3 failed"))
if (template_default_arg.ott(1, 1) != 10):
- raise RuntimeError, ("ott test 4 failed")
+ raise RuntimeError(("ott test 4 failed"))
if (template_default_arg.ott("hi") != 20):
- raise RuntimeError, ("ott test 5 failed")
+ raise RuntimeError(("ott test 5 failed"))
if (template_default_arg.ott("hi", 1) != 20):
- raise RuntimeError, ("ott test 6 failed")
+ raise RuntimeError(("ott test 6 failed"))
if (template_default_arg.ott("hi", 1, 1) != 20):
- raise RuntimeError, ("ott test 7 failed")
+ raise RuntimeError(("ott test 7 failed"))
# %template(ott) ott<const char *>
if (template_default_arg.ottstring(template_default_arg.Hello_int(), "hi") != 40):
- raise RuntimeError, ("ott test 8 failed")
+ raise RuntimeError(("ott test 8 failed"))
if (template_default_arg.ottstring(template_default_arg.Hello_int()) != 40):
- raise RuntimeError, ("ott test 9 failed")
+ raise RuntimeError(("ott test 9 failed"))
# %template(ott) ott<int>
if (template_default_arg.ottint(template_default_arg.Hello_int(), 1) != 50):
- raise RuntimeError, ("ott test 10 failed")
+ raise RuntimeError(("ott test 10 failed"))
if (template_default_arg.ottint(template_default_arg.Hello_int()) != 50):
- raise RuntimeError, ("ott test 11 failed")
+ raise RuntimeError(("ott test 11 failed"))
# %template(ott) ott<double>
if (template_default_arg.ott(template_default_arg.Hello_int(), 1.0) != 60):
- raise RuntimeError, ("ott test 12 failed")
+ raise RuntimeError(("ott test 12 failed"))
if (template_default_arg.ott(template_default_arg.Hello_int()) != 60):
- raise RuntimeError, ("ott test 13 failed")
+ raise RuntimeError(("ott test 13 failed"))