Upstream version 1.3.40
[profile/ivi/swig.git] / Examples / test-suite / octave / default_args_runme.m
1 default_args
2
3
4 if (default_args.Statics.staticmethod() != 60)
5   error
6 endif
7
8 if (default_args.cfunc1(1) != 2)
9   error
10 endif
11
12 if (default_args.cfunc2(1) != 3)
13   error
14 endif
15
16 if (default_args.cfunc3(1) != 4)
17   error
18 endif
19
20
21 f = default_args.Foo();
22
23 f.newname();
24 f.newname(1);
25
26
27 try
28   f = default_args.Foo(1);
29   ok = 1;
30 catch
31   ok = 0;
32 end_try_catch
33 if (ok)
34   error("Foo::Foo ignore is not working")
35 endif
36
37 try
38   f = default_args.Foo(1,2);
39   ok = 1;
40 catch
41   ok = 0;
42 end_try_catch
43 if (ok)
44   error("Foo::Foo ignore is not working")
45 endif
46
47 try
48   f = default_args.Foo(1,2,3);
49   ok = 1;
50 catch
51   ok = 0;
52 end_try_catch
53 if (ok)
54   error("Foo::Foo ignore is not working")
55 endif
56
57 try
58   m = f.meth(1);
59   ok = 1;
60 catch
61   ok = 0;
62 end_try_catch
63 if (ok)
64   error("Foo::meth ignore is not working")
65 endif
66
67 try
68   m = f.meth(1,2);
69   ok = 1;
70 catch
71   ok = 0;
72 end_try_catch
73 if (ok)
74   error("Foo::meth ignore is not working")
75 endif
76
77 try
78   m = f.meth(1,2,3);
79   ok = 1;
80 catch
81   ok = 0;
82 end_try_catch
83 if (ok)
84   error("Foo::meth ignore is not working")
85 endif
86