PageRenderTime 14ms CodeModel.GetById 2ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/python/varargs_overload_runme.py

#
Python | 31 lines | 19 code | 12 blank | 0 comment | 9 complexity | be22160a81077c325fa3597931f31b92 MD5 | raw file
 1import varargs_overload
 2
 3if varargs_overload.vararg_over1("Hello") != "Hello":
 4    raise RuntimeError, "Failed"
 5
 6if varargs_overload.vararg_over1(2) != "2":
 7    raise RuntimeError, "Failed"
 8
 9
10if varargs_overload.vararg_over2("Hello") != "Hello":
11    raise RuntimeError, "Failed"
12
13if varargs_overload.vararg_over2(2, 2.2) != "2 2.2":
14    raise RuntimeError, "Failed"
15
16
17if varargs_overload.vararg_over3("Hello") != "Hello":
18    raise RuntimeError, "Failed"
19
20if varargs_overload.vararg_over3(2, 2.2, "hey") != "2 2.2 hey":
21    raise RuntimeError, "Failed"
22
23if varargs_overload.vararg_over4("Hello") != "Hello":
24    raise RuntimeError, "Failed"
25
26if varargs_overload.vararg_over4(123) != "123":
27    raise RuntimeError, "Failed"
28
29if varargs_overload.vararg_over4("Hello", 123) != "Hello":
30    raise RuntimeError, "Failed"
31