2 using overload_complicatedNamespace;
8 SWIGTYPE_p_int pInt = null;
10 // Check the correct constructors are available
11 Pop p = new Pop(pInt);
13 p = new Pop(pInt, false);
15 // Check overloaded in const only and pointers/references which target languages cannot disambiguate
16 if (p.hip(false) != 701)
17 throw new Exception("Test 1 failed");
19 if (p.hip(pInt) != 702)
20 throw new Exception("Test 2 failed");
22 // Reverse the order for the above
23 if (p.hop(pInt) != 805)
24 throw new Exception("Test 3 failed");
26 if (p.hop(false) != 801)
27 throw new Exception("Test 4 failed");
29 // Few more variations and order shuffled
30 if (p.pop(false) != 901)
31 throw new Exception("Test 5 failed");
33 if (p.pop(pInt) != 902)
34 throw new Exception("Test 6 failed");
37 throw new Exception("Test 7 failed");
39 // Overload on const only
40 if (p.bop(pInt) != 1001)
41 throw new Exception("Test 8 failed");
43 if (p.bip(pInt) != 2001)
44 throw new Exception("Test 9 failed");
47 if (overload_complicated.muzak(false) != 3001)
48 throw new Exception("Test 10 failed");
50 if (overload_complicated.muzak(pInt) != 3002)
51 throw new Exception("Test 11 failed");