1 # Note: This example assumes that namespaces are flattened
4 n = cpp_namespace.fact(4);
6 error("Bad return value!")
9 if (cpp_namespace.cvar.Foo != 42)
10 error("Bad variable value!")
13 t = cpp_namespace.Test();
14 if (!strcmp(t.method(),"Test::method"))
15 error("Bad method return value!")
18 if (!strcmp(cpp_namespace.do_method(t),"Test::method"))
19 error("Bad return value!")
22 if (!strcmp(cpp_namespace.do_method2(t),"Test::method"))
23 error("Bad return value!")
26 cpp_namespace.weird("hello", 4);
30 t2 = cpp_namespace.Test2();
31 t3 = cpp_namespace.Test3();
32 t4 = cpp_namespace.Test4();
33 t5 = cpp_namespace.Test5();
35 if (cpp_namespace.foo3(42) != 42)
36 error("Bad return value!")
39 if (!strcmp(cpp_namespace.do_method3(t2,40),"Test2::method"))
40 error("Bad return value!")
43 if (!strcmp(cpp_namespace.do_method3(t3,40),"Test3::method"))
44 error("Bad return value!")
47 if (!strcmp(cpp_namespace.do_method3(t4,40),"Test4::method"))
48 error("Bad return value!")
51 if (!strcmp(cpp_namespace.do_method3(t5,40),"Test5::method"))
52 error("Bad return value!")