blob: a72e0f1e0cf52c24f49eb92dffceca7b016dbf6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
template_typedef_cplx2
#
# double case
#
try
d = make_Identity_double();
a = swig_this(d);
catch
d
error("is not an instance")
end_try_catch
if (strfind('ArithUnaryFunction',swig_type(d)) != 1)
d
error("is not an ArithUnaryFunction")
error
endif
try
e = make_Multiplies_double_double_double_double(d, d);
a = swig_this(e);
catch
e
error("is not an instance")
end_try_catch
if (strfind('ArithUnaryFunction',swig_type(e)) != 1)
e
error("is not an ArithUnaryFunction")
endif
#
# complex case
#
try
c = make_Identity_complex();
a = swig_this(c);
catch
c
error("is not an instance")
end_try_catch
if (strfind('ArithUnaryFunction',swig_type(c)) != 1)
c
error("is not an ArithUnaryFunction")
endif
try
f = make_Multiplies_complex_complex_complex_complex(c, c);
a = swig_this(f);
catch
f
error("is not an instance")
end_try_catch
if (strfind('ArithUnaryFunction',swig_type(f)) != 1)
f
error("is not an ArithUnaryFunction")
endif
#
# Mix case
#
try
g = make_Multiplies_double_double_complex_complex(d, c);
a = swig_this(g);
catch
g
error("is not an instance")
end_try_catch
if (strfind('ArithUnaryFunction',swig_type(g)) != 1)
g
error("is not an ArithUnaryFunction")
error
endif
try
h = make_Multiplies_complex_complex_double_double(c, d);
a = swig_this(h);
catch
h
error("is not an instance")
end_try_catch
if (strfind('ArithUnaryFunction',swig_type(h)) == -1)
h
error("is not an ArithUnaryFunction")
endif
try
a = g.get_value();
catch
error(g, "has not get_value() method")
error
end_try_catch
|