Octave: error() must be called with an argument

This commit is contained in:
Karl Wette 2020-06-08 03:18:37 +10:00
commit 251ab662bf
77 changed files with 308 additions and 308 deletions

View file

@ -2,6 +2,6 @@ abstract_access
d = abstract_access.D(); d = abstract_access.D();
if (d.do_x() != 1) if (d.do_x() != 1)
error error("failed");
endif endif

View file

@ -10,7 +10,7 @@ a = A();
if (a.write(e) != 1) if (a.write(e) != 1)
error error("failed");
endif endif

View file

@ -2,39 +2,39 @@ _callback
callback callback
if (foo(2) != 2) if (foo(2) != 2)
error error("failed");
endif endif
if (A_bar(2) != 4) if (A_bar(2) != 4)
error error("failed");
endif endif
if (foobar(3, _callback.foo) != foo(3)) if (foobar(3, _callback.foo) != foo(3))
error error("failed");
endif endif
if (foobar(3, foo) != foo(3)) if (foobar(3, foo) != foo(3))
error error("failed");
endif endif
if (foobar(3, A_bar) != A_bar(3)) if (foobar(3, A_bar) != A_bar(3))
error error("failed");
endif endif
if (foobar(3, foof) != foof(3)) if (foobar(3, foof) != foof(3))
error error("failed");
endif endif
if (foobar_i(3, foo_i) != foo_i(3)) if (foobar_i(3, foo_i) != foo_i(3))
error error("failed");
endif endif
if (foobar_d(3.5, foo_d) != foo_d(3.5)) if (foobar_d(3.5, foo_d) != foo_d(3.5))
error error("failed");
endif endif
a = A(); a = A();
if (foobarm(3, a, A.foom_cb_ptr) != a.foom(3)) if (foobarm(3, a, A.foom_cb_ptr) != a.foom(3))
error error("failed");
endif endif

View file

@ -8,5 +8,5 @@ class_ignore
a = class_ignore.Bar(); a = class_ignore.Bar();
if (!strcmp(class_ignore.do_blah(a),"Bar::blah")) if (!strcmp(class_ignore.do_blah(a),"Bar::blah"))
error error("failed");
endif endif

View file

@ -3,5 +3,5 @@ class_scope_weird
f = class_scope_weird.Foo(); f = class_scope_weird.Foo();
g = class_scope_weird.Foo(3); g = class_scope_weird.Foo(3);
if (f.bar(3) != 3) if (f.bar(3) != 3)
error error("failed");
endif endif

View file

@ -4,21 +4,21 @@ defaults1 = Defaults1(1000);
defaults1 = Defaults1(); defaults1 = Defaults1();
if (defaults1.ret(10.0) != 10.0) if (defaults1.ret(10.0) != 10.0)
error error("failed");
endif endif
if (defaults1.ret() != -1.0) if (defaults1.ret() != -1.0)
error error("failed");
endif endif
defaults2 = Defaults2(1000); defaults2 = Defaults2(1000);
defaults2 = Defaults2(); defaults2 = Defaults2();
if (defaults2.ret(10.0) != 10.0) if (defaults2.ret(10.0) != 10.0)
error error("failed");
endif endif
if (defaults2.ret() != -1.0) if (defaults2.ret() != -1.0)
error error("failed");
endif endif

View file

@ -10,7 +10,7 @@ f11 = Foo1(f1);
if (f1.x != f11.x) if (f1.x != f11.x)
error error("failed");
endif endif
@ -23,7 +23,7 @@ catch
end_try_catch end_try_catch
if (!good) if (!good)
error error("failed");
endif endif
@ -31,7 +31,7 @@ bi = Bari(5);
bc = Bari(bi); bc = Bari(bi);
if (bi.x != bc.x) if (bi.x != bc.x)
error error("failed");
endif endif
@ -44,6 +44,6 @@ catch
end_try_catch end_try_catch
if (!good) if (!good)
error error("failed");
endif endif

View file

@ -7,19 +7,19 @@ default_args
if (default_args.Statics.staticmethod() != 60) if (default_args.Statics.staticmethod() != 60)
error error("failed");
endif endif
if (default_args.cfunc1(1) != 2) if (default_args.cfunc1(1) != 2)
error error("failed");
endif endif
if (default_args.cfunc2(1) != 3) if (default_args.cfunc2(1) != 3)
error error("failed");
endif endif
if (default_args.cfunc3(1) != 4) if (default_args.cfunc3(1) != 4)
error error("failed");
endif endif

View file

@ -28,17 +28,17 @@ MyExample3=@() subclass(director_abstract.Example3_i(),'Color',@(self,r,g,b) b);
me1 = MyExample1(); me1 = MyExample1();
if (director_abstract.Example1.get_color(me1, 1,2,3) != 1) if (director_abstract.Example1.get_color(me1, 1,2,3) != 1)
error error("failed");
endif endif
me2 = MyExample2(1,2); me2 = MyExample2(1,2);
if (me2.get_color(me2, 1,2,3) != 2) if (me2.get_color(me2, 1,2,3) != 2)
error error("failed");
endif endif
me3 = MyExample3(); me3 = MyExample3();
if (me3.get_color(me3, 1,2,3) != 3) if (me3.get_color(me3, 1,2,3) != 3)
error error("failed");
endif endif

View file

@ -33,7 +33,7 @@ endif
a = director_basic.A1(1); a = director_basic.A1(1);
if (a.rg(2) != 2) if (a.rg(2) != 2)
error error("failed");
endif endif
function self=OctClass() function self=OctClass()
@ -62,16 +62,16 @@ bd = dd.cmethod(b);
cc.method(b); cc.method(b);
if (c.cmethod != 7) if (c.cmethod != 7)
error error("failed");
endif endif
if (bc.x != 34) if (bc.x != 34)
error error("failed");
endif endif
if (bd.x != 16) if (bd.x != 16)
error error("failed");
endif endif

View file

@ -6,5 +6,5 @@ b = director_enum.Foo();
a = MyFoo(); a = MyFoo();
if (a.say_hi(director_enum.hello) != b.say_hello(director_enum.hi)) if (a.say_hi(director_enum.hello) != b.say_hello(director_enum.hi))
error error("failed");
endif endif

View file

@ -31,9 +31,9 @@ c = FooBar_int_get_self(cc);
c.advance(); c.advance();
if (!strcmp(c.get_name(),"FooBar::get_name hello")) if (!strcmp(c.get_name(),"FooBar::get_name hello"))
error error("failed");
endif endif
if (!strcmp(c.name(),"FooBar::get_name hello")) if (!strcmp(c.name(),"FooBar::get_name hello"))
error error("failed");
endif endif

View file

@ -11,6 +11,6 @@ c = b.get();
if (swig_this(a) != swig_this(c)) if (swig_this(a) != swig_this(c))
a,c a,c
error error("failed");
endif endif

View file

@ -6,13 +6,13 @@ endif
enum_template enum_template
if (enum_template.MakeETest() != 1) if (enum_template.MakeETest() != 1)
error error("failed");
endif endif
enum_template.TakeETest(0); enum_template.TakeETest(0);
try try
a=enum_template.TakeETest(0); a=enum_template.TakeETest(0);
error error("failed");
catch catch
end_try_catch end_try_catch

View file

@ -6,18 +6,18 @@ enums.bar3(1)
enums.bar1(1) enums.bar1(1)
if (enums.cvar.enumInstance != 2) if (enums.cvar.enumInstance != 2)
error error("failed");
endif endif
if (enums.cvar.Slap != 10) if (enums.cvar.Slap != 10)
error error("failed");
endif endif
if (enums.cvar.Mine != 11) if (enums.cvar.Mine != 11)
error error("failed");
endif endif
if (enums.cvar.Thigh != 12) if (enums.cvar.Thigh != 12)
error error("failed");
endif endif

View file

@ -7,9 +7,9 @@ extend_template_ns
f = Foo_One(); f = Foo_One();
if (f.test1(37) != 37) if (f.test1(37) != 37)
error error("failed");
endif endif
if (f.test2(42) != 42) if (f.test2(42) != 42)
error error("failed");
endif endif

View file

@ -2,9 +2,9 @@ extend_template
f = extend_template.Foo_0(); f = extend_template.Foo_0();
if (f.test1(37) != 37) if (f.test1(37) != 37)
error error("failed");
endif endif
if (f.test2(42) != 42) if (f.test2(42) != 42)
error error("failed");
endif endif

View file

@ -1,6 +1,6 @@
extend_variable extend_variable
if (Foo.Bar != 42) if (Foo.Bar != 42)
error error("failed");
endif endif

View file

@ -8,25 +8,25 @@ friends
a = friends.A(2); a = friends.A(2);
if (friends.get_val1(a) != 2) if (friends.get_val1(a) != 2)
error error("failed");
endif endif
if (friends.get_val2(a) != 4) if (friends.get_val2(a) != 4)
error error("failed");
endif endif
if (friends.get_val3(a) != 6) if (friends.get_val3(a) != 6)
error error("failed");
endif endif
# nice overload working fine # nice overload working fine
if (friends.get_val1(1,2,3) != 1) if (friends.get_val1(1,2,3) != 1)
error error("failed");
endif endif
b = friends.B(3); b = friends.B(3);
# David's case # David's case
if (friends.mix(a,b) != 5) if (friends.mix(a,b) != 5)
error error("failed");
endif endif
di = friends.D_d(2); di = friends.D_d(2);
@ -34,18 +34,18 @@ dd = friends.D_d(3.3);
# incredible template overloading working just fine # incredible template overloading working just fine
if (friends.get_val1(di) != 2) if (friends.get_val1(di) != 2)
error error("failed");
endif endif
if (friends.get_val1(dd) != 3.3) if (friends.get_val1(dd) != 3.3)
error error("failed");
endif endif
friends.set(di, 4); friends.set(di, 4);
friends.set(dd, 1.3); friends.set(dd, 1.3);
if (friends.get_val1(di) != 4) if (friends.get_val1(di) != 4)
error error("failed");
endif endif
if (friends.get_val1(dd) != 1.3) if (friends.get_val1(dd) != 1.3)
error error("failed");
endif endif

View file

@ -7,14 +7,14 @@ grouping
x = grouping.test1(42); x = grouping.test1(42);
if (x != 42) if (x != 42)
error error("failed");
endif endif
grouping.test2(42); grouping.test2(42);
x = (grouping.do_unary(37, grouping.NEGATE)); x = (grouping.do_unary(37, grouping.NEGATE));
if (x != -37) if (x != -37)
error error("failed");
endif endif
grouping.cvar.test3 = 42; grouping.cvar.test3 = 42;

View file

@ -6,5 +6,5 @@ f.AsA.x = 3;
f.AsA += f.AsA; f.AsA += f.AsA;
if (f.AsA.x != 6) if (f.AsA.x != 6)
error error("failed");
endif endif

View file

@ -2,26 +2,26 @@ inout
a = inout.AddOne1(1); a = inout.AddOne1(1);
if (a != 2) if (a != 2)
error error("failed");
endif endif
a = inout.AddOne3(1,1,1); a = inout.AddOne3(1,1,1);
if (a != [2,2,2]) if (a != [2,2,2])
error error("failed");
endif endif
a = inout.AddOne1p((1,1)); a = inout.AddOne1p((1,1));
if (a != (2,2)) if (a != (2,2))
error error("failed");
endif endif
a = inout.AddOne2p((1,1),1); a = inout.AddOne2p((1,1),1);
if (a != [(2,2),2]) if (a != [(2,2),2])
error error("failed");
endif endif
a = inout.AddOne3p(1,(1,1),1); a = inout.AddOne3p(1,(1,1),1);
if (a != [2,(2,2),2]) if (a != [2,(2,2),2])
error error("failed");
endif endif

View file

@ -3,22 +3,22 @@ a = inplaceadd.A(7);
a += 5; a += 5;
if (a.val != 12) if (a.val != 12)
error error("failed");
endif endif
a -= 5; a -= 5;
if a.val != 7: if a.val != 7:
error error("failed");
endif endif
a *= 2; a *= 2;
if (a.val != 14) if (a.val != 14)
error error("failed");
endif endif
a += a; a += a;
if (a.val != 28) if (a.val != 28)
error error("failed");
endif endif

View file

@ -7,21 +7,21 @@ input
f = Foo(); f = Foo();
if (f.foo(2) != 4) if (f.foo(2) != 4)
error error("failed");
endif endif
try try
a=f.foo(); a=f.foo();
error error("failed");
catch catch
end_try_catch end_try_catch
if (!strcmp(sfoo("Hello"),"Hello world")) if (!strcmp(sfoo("Hello"),"Hello world"))
error error("failed");
endif endif
try try
a=sfoo(); a=sfoo();
error error("failed");
catch catch
end_try_catch end_try_catch

View file

@ -8,7 +8,7 @@ li_attribute
aa = li_attribute.A(1,2,3); aa = li_attribute.A(1,2,3);
if (aa.a != 1) if (aa.a != 1)
error error("failed");
endif endif
aa.a = 3; aa.a = 3;
if (aa.a != 3) if (aa.a != 3)
@ -20,31 +20,31 @@ if (aa.b != 2)
endif endif
aa.b = 5; aa.b = 5;
if (aa.b != 5) if (aa.b != 5)
error error("failed");
endif endif
if (aa.d != aa.b) if (aa.d != aa.b)
error error("failed");
endif endif
if (aa.c != 3) if (aa.c != 3)
error error("failed");
endif endif
pi = li_attribute.Param_i(7); pi = li_attribute.Param_i(7);
if (pi.value != 7) if (pi.value != 7)
error error("failed");
endif endif
pi.value=3; pi.value=3;
if (pi.value != 3) if (pi.value != 3)
error error("failed");
endif endif
b = li_attribute.B(aa); b = li_attribute.B(aa);
if (b.a.c != 3) if (b.a.c != 3)
error error("failed");
endif endif
# class/struct attribute with get/set methods using return/pass by reference # class/struct attribute with get/set methods using return/pass by reference
@ -53,38 +53,38 @@ myFoo.x = 8;
myClass = li_attribute.MyClass(); myClass = li_attribute.MyClass();
myClass.Foo = myFoo; myClass.Foo = myFoo;
if (myClass.Foo.x != 8) if (myClass.Foo.x != 8)
error error("failed");
endif endif
# class/struct attribute with get/set methods using return/pass by value # class/struct attribute with get/set methods using return/pass by value
myClassVal = li_attribute.MyClassVal(); myClassVal = li_attribute.MyClassVal();
if (myClassVal.ReadWriteFoo.x != -1) if (myClassVal.ReadWriteFoo.x != -1)
error error("failed");
endif endif
if (myClassVal.ReadOnlyFoo.x != -1) if (myClassVal.ReadOnlyFoo.x != -1)
error error("failed");
endif endif
myClassVal.ReadWriteFoo = myFoo; myClassVal.ReadWriteFoo = myFoo;
if (myClassVal.ReadWriteFoo.x != 8) if (myClassVal.ReadWriteFoo.x != 8)
error error("failed");
endif endif
if (myClassVal.ReadOnlyFoo.x != 8) if (myClassVal.ReadOnlyFoo.x != 8)
error error("failed");
endif endif
# string attribute with get/set methods using return/pass by value # string attribute with get/set methods using return/pass by value
myStringyClass = li_attribute.MyStringyClass("initial string"); myStringyClass = li_attribute.MyStringyClass("initial string");
if (myStringyClass.ReadWriteString != "initial string") if (myStringyClass.ReadWriteString != "initial string")
error error("failed");
endif endif
if (myStringyClass.ReadOnlyString != "initial string") if (myStringyClass.ReadOnlyString != "initial string")
error error("failed");
endif endif
myStringyClass.ReadWriteString = "changed string"; myStringyClass.ReadWriteString = "changed string";
if (myStringyClass.ReadWriteString != "changed string") if (myStringyClass.ReadWriteString != "changed string")
error error("failed");
endif endif
if (myStringyClass.ReadOnlyString != "changed string") if (myStringyClass.ReadOnlyString != "changed string")
error error("failed");
endif endif

View file

@ -11,5 +11,5 @@ d(0) = 7;
d(5) = d(0) + 3; d(5) = d(0) + 3;
if (d(5) + d(0) != 17) if (d(5) + d(0) != 17)
error error("failed");
endif endif

View file

@ -11,5 +11,5 @@ d(0) = 7;
d(5) = d(0) + 3; d(5) = d(0) + 3;
if (d(5) + d(0) != 17) if (d(5) + d(0) != 17)
error error("failed");
endif endif

View file

@ -17,6 +17,6 @@ catch
end_try_catch end_try_catch
if (ok != 1) if (ok != 1)
error error("failed");
endif endif

View file

@ -5,7 +5,7 @@ p = new_intp();
intp_assign(p,3); intp_assign(p,3);
if (intp_value(p) != 3) if (intp_value(p) != 3)
error error("failed");
endif endif
delete_intp(p); delete_intp(p);

View file

@ -10,7 +10,7 @@ p = new_intp();
intp_assign(p,3); intp_assign(p,3);
if (intp_value(p) != 3) if (intp_value(p) != 3)
error error("failed");
endif endif
delete_intp(p); delete_intp(p);

View file

@ -7,15 +7,15 @@ li_cstring
if (count("ab\0ab\0ab\0", 0) != 3) if (count("ab\0ab\0ab\0", 0) != 3)
error error("failed");
endif endif
if (!strcmp(test1(),"Hello World")) if (!strcmp(test1(),"Hello World"))
error error("failed");
endif endif
if (!strcmp(test2()," !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_")) if (!strcmp(test2()," !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_"))
error error("failed");
endif endif
if (!strcmp(test3("hello"),"hello-suffix")) if (!strcmp(test3("hello"),"hello-suffix"))
@ -27,18 +27,18 @@ if (!strcmp(test4("hello"),"hello-suffix"))
endif endif
if (!strcmp(test5(4),'xxxx')) if (!strcmp(test5(4),'xxxx'))
error error("failed");
endif endif
if (!strcmp(test6(10),'xxxxx')) if (!strcmp(test6(10),'xxxxx'))
error error("failed");
endif endif
if (!strcmp(test7(),"Hello world!")) if (!strcmp(test7(),"Hello world!"))
error error("failed");
endif endif
if (!strcmp(test8()," !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_")) if (!strcmp(test8()," !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_"))
error error("failed");
endif endif

View file

@ -6,38 +6,38 @@ endif
li_cwstring li_cwstring
if (count("ab\0ab\0ab\0", 0) != 3) if (count("ab\0ab\0ab\0", 0) != 3)
error error("failed");
endif endif
if (!strcmp(test1(),"Hello World")) if (!strcmp(test1(),"Hello World"))
error error("failed");
endif endif
if (!strcmp(test2()," !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_")) if (!strcmp(test2()," !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_"))
error error("failed");
endif endif
if (!strcmp(test3("hello"),"hello-suffix")) if (!strcmp(test3("hello"),"hello-suffix"))
error error("failed");
endif endif
if (!strcmp(test4("hello"),"hello-suffix")) if (!strcmp(test4("hello"),"hello-suffix"))
error error("failed");
endif endif
if (!strcmp(test5(4),'xxxx')) if (!strcmp(test5(4),'xxxx'))
error error("failed");
endif endif
if (!strcmp(test6(10),'xxxxx')) if (!strcmp(test6(10),'xxxxx'))
error error("failed");
endif endif
if (!strcmp(test7(),"Hello world!")) if (!strcmp(test7(),"Hello world!"))
error error("failed");
endif endif
if (!strcmp(test8()," !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_")) if (!strcmp(test8()," !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_"))
error error("failed");
endif endif

View file

@ -8,11 +8,11 @@ li_factory
circle = Geometry_create(Geometry.CIRCLE); circle = Geometry_create(Geometry.CIRCLE);
r = circle.radius(); r = circle.radius();
if (r != 1.5) if (r != 1.5)
error error("failed");
endif endif
point = Geometry_create(Geometry.POINT); point = Geometry_create(Geometry.POINT);
w = point.width(); w = point.width();
if (w != 1.0) if (w != 1.0)
error error("failed");
endif endif

View file

@ -9,7 +9,7 @@ endfor
i = 0; i = 0;
for d in v3, for d in v3,
if (d != i) if (d != i)
error error("failed");
endif endif
i = i + 1; i = i + 1;
endfor endfor
@ -29,7 +29,7 @@ for v3 in m3,
j = 0; j = 0;
for d in v3, for d in v3,
if (d != i + j) if (d != i + j)
error error("failed");
endif endif
j = j + 1; j = j + 1;
endfor endfor
@ -39,7 +39,7 @@ endfor
for i=0:len(m3), for i=0:len(m3),
for j=0:len(m3), for j=0:len(m3),
if (m3(i,j) != i + j) if (m3(i,j) != i + j)
error error("failed");
endif endif
endfor endfor
endfor endfor

View file

@ -11,15 +11,15 @@ for i in s:
sum = sum + i sum = sum + i
if (sum != "abc") if (sum != "abc")
error error("failed");
i = s.__iter__() i = s.__iter__()
if i.next() != "a": if i.next() != "a":
error error("failed");
if i.next() != "b": if i.next() != "b":
error error("failed");
if i.next() != "c": if i.next() != "c":
error error("failed");
b = s.begin() b = s.begin()
@ -28,7 +28,7 @@ sum = ""
while (b != e): while (b != e):
sum = sum + b.next() sum = sum + b.next()
if sum != "abc": if sum != "abc":
error error("failed");
b = s.rbegin() b = s.rbegin()
e = s.rend() e = s.rend()
@ -37,7 +37,7 @@ while (b != e):
sum = sum + b.next() sum = sum + b.next()
if sum != "cba": if sum != "cba":
error error("failed");
@ -49,11 +49,11 @@ si.append(3)
i = si.__iter__() i = si.__iter__()
if i.next() != 1: if i.next() != 1:
error error("failed");
if i.next() != 2: if i.next() != 2:
error error("failed");
if i.next() != 3: if i.next() != 3:
error error("failed");
@ -68,17 +68,17 @@ sum = ""
while (b != e): while (b != e):
sum = sum + b.next() sum = sum + b.next()
if sum != "ac": if sum != "ac":
error error("failed");
b = s.begin() b = s.begin()
e = s.end() e = s.end()
if e - b != 2: if e - b != 2:
error error("failed");
m = b + 1 m = b + 1
if m.value() != "c": if m.value() != "c":
error error("failed");
@ -93,4 +93,4 @@ for i in s:
sum = sum + (i,) sum = sum + (i,)
if sum != (1, 'hello', (1, 2)): if sum != (1, 'hello', (1, 2)):
error error("failed");

View file

@ -8,6 +8,6 @@ o << a << " " << 2345 << " " << 1.435;
if (o.str() != "A class 2345 1.435") if (o.str() != "A class 2345 1.435")
error error("failed");
endif endif

View file

@ -140,23 +140,23 @@ endif
if (li_std_string_extra.test_reference_input("hello") != "hello") if (li_std_string_extra.test_reference_input("hello") != "hello")
error error("failed");
endif endif
s = li_std_string_extra.test_reference_inout("hello"); s = li_std_string_extra.test_reference_inout("hello");
if (s != "hellohello") if (s != "hellohello")
error error("failed");
endif endif
if (li_std_string_extra.stdstring_empty() != "") if (li_std_string_extra.stdstring_empty() != "")
error error("failed");
endif endif
if (li_std_string_extra.c_empty() != "") if (li_std_string_extra.c_empty() != "")
error error("failed");
endif endif
#if (li_std_string_extra.c_null() != None) #if (li_std_string_extra.c_null() != None)
# error # error("failed");
#endif #endif

View file

@ -9,6 +9,6 @@ o = wostringstream();
o << a << u" " << 2345 << u" " << 1.435 << wends; o << a << u" " << 2345 << u" " << 1.435 << wends;
if (o.str() != "A class 2345 1.435\0") if (o.str() != "A class 2345 1.435\0")
error error("failed");
endif endif

View file

@ -8,22 +8,22 @@ multi_import_b;
x = multi_import_b.XXX(); x = multi_import_b.XXX();
if (x.testx() != 0) if (x.testx() != 0)
error error("failed");
endif endif
y = multi_import_b.YYY(); y = multi_import_b.YYY();
if (y.testx() != 0) if (y.testx() != 0)
error error("failed");
endif endif
if (y.testy() != 1) if (y.testy() != 1)
error error("failed");
endif endif
z = multi_import_a.ZZZ(); z = multi_import_a.ZZZ();
if (z.testx() != 0) if (z.testx() != 0)
error error("failed");
endif endif
if (z.testz() != 2) if (z.testz() != 2)
error error("failed");
endif endif

View file

@ -1,106 +1,106 @@
namespace_typemap namespace_typemap
if (!strcmp(stest1("hello"),"hello")) if (!strcmp(stest1("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest2("hello"),"hello")) if (!strcmp(stest2("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest3("hello"),"hello")) if (!strcmp(stest3("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest4("hello"),"hello")) if (!strcmp(stest4("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest5("hello"),"hello")) if (!strcmp(stest5("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest6("hello"),"hello")) if (!strcmp(stest6("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest7("hello"),"hello")) if (!strcmp(stest7("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest8("hello"),"hello")) if (!strcmp(stest8("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest9("hello"),"hello")) if (!strcmp(stest9("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest10("hello"),"hello")) if (!strcmp(stest10("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest11("hello"),"hello")) if (!strcmp(stest11("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(stest12("hello"),"hello")) if (!strcmp(stest12("hello"),"hello"))
error error("failed");
endif endif
c = complex(2,3); c = complex(2,3);
r = real(c); r = real(c);
if (ctest1(c) != r) if (ctest1(c) != r)
error error("failed");
endif endif
if (ctest2(c) != r) if (ctest2(c) != r)
error error("failed");
endif endif
if (ctest3(c) != r) if (ctest3(c) != r)
error error("failed");
endif endif
if (ctest4(c) != r) if (ctest4(c) != r)
error error("failed");
endif endif
if (ctest5(c) != r) if (ctest5(c) != r)
error error("failed");
endif endif
if (ctest6(c) != r) if (ctest6(c) != r)
error error("failed");
endif endif
if (ctest7(c) != r) if (ctest7(c) != r)
error error("failed");
endif endif
if (ctest8(c) != r) if (ctest8(c) != r)
error error("failed");
endif endif
if (ctest9(c) != r) if (ctest9(c) != r)
error error("failed");
endif endif
if (ctest10(c) != r) if (ctest10(c) != r)
error error("failed");
endif endif
if (ctest11(c) != r) if (ctest11(c) != r)
error error("failed");
endif endif
if (ctest12(c) != r) if (ctest12(c) != r)
error error("failed");
endif endif
try try
ttest1(-14) ttest1(-14)
error error("failed");
catch catch
end_try_catch end_try_catch

View file

@ -14,6 +14,6 @@ cvar.s = "hello";
b.s = "hello"; b.s = "hello";
if (b.s != cvar.s) if (b.s != cvar.s)
error error("failed");
endif endif

View file

@ -2,29 +2,29 @@ overload_extend2
f = overload_extend2.Foo(); f = overload_extend2.Foo();
if (f.test(3) != 1) if (f.test(3) != 1)
error error("failed");
endif endif
if (f.test("hello") != 2) if (f.test("hello") != 2)
error error("failed");
endif endif
if (f.test(3.5,2.5) != 3) if (f.test(3.5,2.5) != 3)
error error("failed");
endif endif
if (f.test("hello",20) != 1020) if (f.test("hello",20) != 1020)
error error("failed");
endif endif
if (f.test("hello",20,100) != 120) if (f.test("hello",20,100) != 120)
error error("failed");
endif endif
# C default args # C default args
if (f.test(f) != 30) if (f.test(f) != 30)
error error("failed");
endif endif
if (f.test(f,100) != 120) if (f.test(f,100) != 120)
error error("failed");
endif endif
if (f.test(f,100,200) != 300) if (f.test(f,100,200) != 300)
error error("failed");
endif endif

View file

@ -7,18 +7,18 @@ overload_extend_c
f = overload_extend_c.Foo(); f = overload_extend_c.Foo();
if (f.test() != 0) if (f.test() != 0)
error error("failed");
endif endif
if (f.test(3) != 1) if (f.test(3) != 1)
error error("failed");
endif endif
if (f.test("hello") != 2) if (f.test("hello") != 2)
error error("failed");
endif endif
if (f.test(3,2) != 5) if (f.test(3,2) != 5)
error error("failed");
endif endif
if (f.test(3.1)-.1 != 1003) # :) if (f.test(3.1)-.1 != 1003) # :)
error error("failed");
endif endif

View file

@ -7,18 +7,18 @@ overload_extend
f = overload_extend.Foo(); f = overload_extend.Foo();
if (f.test() != 0) if (f.test() != 0)
error error("failed");
endif endif
if (f.test(3) != 1) if (f.test(3) != 1)
error error("failed");
endif endif
if (f.test("hello") != 2) if (f.test("hello") != 2)
error error("failed");
endif endif
if (f.test(3,2) != 5) if (f.test(3,2) != 5)
error error("failed");
endif endif
if (f.test(3.1)-.1 != 1003) # :) if (f.test(3.1)-.1 != 1003) # :)
error error("failed");
endif endif

View file

@ -6,18 +6,18 @@ endif
preproc preproc
if (preproc.cvar.endif != 1) if (preproc.cvar.endif != 1)
error error("failed");
endif endif
if (preproc.cvar.define != 1) if (preproc.cvar.define != 1)
error error("failed");
endif endif
if (preproc.cvar.defined != 1) if (preproc.cvar.defined != 1)
error error("failed");
endif endif
if (2*preproc.one != preproc.two) if (2*preproc.one != preproc.two)
error error("failed");
endif endif

View file

@ -1,53 +1,53 @@
primitive_ref primitive_ref
if (ref_int(3) != 3) if (ref_int(3) != 3)
error error("failed");
endif endif
if (ref_uint(3) != 3) if (ref_uint(3) != 3)
error error("failed");
endif endif
if (ref_short(3) != 3) if (ref_short(3) != 3)
error error("failed");
endif endif
if (ref_ushort(3) != 3) if (ref_ushort(3) != 3)
error error("failed");
endif endif
if (ref_long(3) != 3) if (ref_long(3) != 3)
error error("failed");
endif endif
if (ref_ulong(3) != 3) if (ref_ulong(3) != 3)
error error("failed");
endif endif
if (ref_schar(3) != 3) if (ref_schar(3) != 3)
error error("failed");
endif endif
if (ref_uchar(3) != 3) if (ref_uchar(3) != 3)
error error("failed");
endif endif
if (ref_float(3.5) != 3.5) if (ref_float(3.5) != 3.5)
error error("failed");
endif endif
if (ref_double(3.5) != 3.5) if (ref_double(3.5) != 3.5)
error error("failed");
endif endif
if (ref_bool(true) != true) if (ref_bool(true) != true)
error error("failed");
endif endif
if (!strcmp(ref_char('x'),'x')) if (!strcmp(ref_char('x'),'x'))
error error("failed");
endif endif
if (ref_over(0) != 0) if (ref_over(0) != 0)
error error("failed");
endif endif

View file

@ -2,90 +2,90 @@ reference_global_vars
# const class reference variable # const class reference variable
if (getconstTC().num != 33) if (getconstTC().num != 33)
error error("failed");
endif endif
# primitive reference variables # primitive reference variables
cvar.var_bool = createref_bool(false); cvar.var_bool = createref_bool(false);
if (value_bool(cvar.var_bool) != 0) if (value_bool(cvar.var_bool) != 0)
error error("failed");
endif endif
cvar.var_bool = createref_bool(true); cvar.var_bool = createref_bool(true);
if (value_bool(cvar.var_bool) != 1) if (value_bool(cvar.var_bool) != 1)
error error("failed");
endif endif
cvar.var_char = createref_char('w'); cvar.var_char = createref_char('w');
if (!strcmp(value_char(cvar.var_char),'w')) if (!strcmp(value_char(cvar.var_char),'w'))
error error("failed");
endif endif
cvar.var_unsigned_char = createref_unsigned_char(10); cvar.var_unsigned_char = createref_unsigned_char(10);
if (value_unsigned_char(cvar.var_unsigned_char) != 10) if (value_unsigned_char(cvar.var_unsigned_char) != 10)
error error("failed");
endif endif
cvar.var_signed_char = createref_signed_char(10); cvar.var_signed_char = createref_signed_char(10);
if (value_signed_char(cvar.var_signed_char) != 10) if (value_signed_char(cvar.var_signed_char) != 10)
error error("failed");
endif endif
cvar.var_short = createref_short(10); cvar.var_short = createref_short(10);
if (value_short(cvar.var_short) != 10) if (value_short(cvar.var_short) != 10)
error error("failed");
endif endif
cvar.var_unsigned_short = createref_unsigned_short(10); cvar.var_unsigned_short = createref_unsigned_short(10);
if (value_unsigned_short(cvar.var_unsigned_short) != 10) if (value_unsigned_short(cvar.var_unsigned_short) != 10)
error error("failed");
endif endif
cvar.var_int = createref_int(10); cvar.var_int = createref_int(10);
if (value_int(cvar.var_int) != 10) if (value_int(cvar.var_int) != 10)
error error("failed");
endif endif
cvar.var_unsigned_int = createref_unsigned_int(10); cvar.var_unsigned_int = createref_unsigned_int(10);
if (value_unsigned_int(cvar.var_unsigned_int) != 10) if (value_unsigned_int(cvar.var_unsigned_int) != 10)
error error("failed");
endif endif
cvar.var_long = createref_long(10); cvar.var_long = createref_long(10);
if (value_long(cvar.var_long) != 10) if (value_long(cvar.var_long) != 10)
error error("failed");
endif endif
cvar.var_unsigned_long = createref_unsigned_long(10); cvar.var_unsigned_long = createref_unsigned_long(10);
if (value_unsigned_long(cvar.var_unsigned_long) != 10) if (value_unsigned_long(cvar.var_unsigned_long) != 10)
error error("failed");
endif endif
cvar.var_long_long = createref_long_long(int64(0x6FFFFFFFFFFFFFF8)); cvar.var_long_long = createref_long_long(int64(0x6FFFFFFFFFFFFFF8));
if (value_long_long(cvar.var_long_long) != int64(0x6FFFFFFFFFFFFFF8)) if (value_long_long(cvar.var_long_long) != int64(0x6FFFFFFFFFFFFFF8))
error error("failed");
endif endif
#ull = abs(0xFFFFFFF2FFFFFFF0) #ull = abs(0xFFFFFFF2FFFFFFF0)
ull = uint64(55834574864); ull = uint64(55834574864);
cvar.var_unsigned_long_long = createref_unsigned_long_long(ull); cvar.var_unsigned_long_long = createref_unsigned_long_long(ull);
if (value_unsigned_long_long(cvar.var_unsigned_long_long) != ull) if (value_unsigned_long_long(cvar.var_unsigned_long_long) != ull)
error error("failed");
endif endif
cvar.var_float = createref_float(10.5); cvar.var_float = createref_float(10.5);
if (value_float(cvar.var_float) != 10.5) if (value_float(cvar.var_float) != 10.5)
error error("failed");
endif endif
cvar.var_double = createref_double(10.5); cvar.var_double = createref_double(10.5);
if (value_double(cvar.var_double) != 10.5) if (value_double(cvar.var_double) != 10.5)
error error("failed");
endif endif
# class reference variable # class reference variable
cvar.var_TestClass = createref_TestClass(TestClass(20)); cvar.var_TestClass = createref_TestClass(TestClass(20));
if (value_TestClass(cvar.var_TestClass).num != 20) if (value_TestClass(cvar.var_TestClass).num != 20)
error error("failed");
endif endif

View file

@ -4,11 +4,11 @@ a = Natural_UP();
b = Natural_BP(); b = Natural_BP();
if (a.rtest() != 1) if (a.rtest() != 1)
error error("failed");
endif endif
if (b.rtest() != 1) if (b.rtest() != 1)
error error("failed");
endif endif
f = @equals; f = @equals;

View file

@ -7,9 +7,9 @@ ret_by_value
a = ret_by_value.get_test(); a = ret_by_value.get_test();
if (a.myInt != 100) if (a.myInt != 100)
error error("failed");
endif endif
if (a.myShort != 200) if (a.myShort != 200)
error error("failed");
endif endif

View file

@ -9,7 +9,7 @@ f = Foo();
b = Bar(f); b = Bar(f);
if (b.extension() != f.extension()) if (b.extension() != f.extension())
error error("failed");
endif endif
@ -18,15 +18,15 @@ d = CDerived();
p = CPtr(); p = CPtr();
if (b.bar() != p.bar()) if (b.bar() != p.bar())
error error("failed");
endif endif
if (d.foo() != p.foo()) if (d.foo() != p.foo())
error error("failed");
endif endif
if (b.hello() != p.hello()) if (b.hello() != p.hello())
error error("failed");
endif endif
@ -36,11 +36,11 @@ d = DFoo();
dp = DPtrFoo(d); dp = DPtrFoo(d);
if (d.SExt(1) != dp.SExt(1)) if (d.SExt(1) != dp.SExt(1))
error error("failed");
endif endif
if (d.Ext(1) != dp.Ext(1)) if (d.Ext(1) != dp.Ext(1))
error error("failed");
endif endif

View file

@ -4,7 +4,7 @@ f = Foo();
f.y = 1; f.y = 1;
if (f.y != 1) if (f.y != 1)
error error("failed");
endif endif
b = Bar(f); b = Bar(f);
@ -15,18 +15,18 @@ if (f.y != 2)
endif endif
if (swig_this(b.x) != swig_this(f.x)) if (swig_this(b.x) != swig_this(f.x))
error error("failed");
endif endif
if (b.z != f.z) if (b.z != f.z)
error error("failed");
endif endif
try try
if (Foo.z == Bar.z) if (Foo.z == Bar.z)
error error("failed");
endif endif
error error("failed");
catch catch
end_try_catch end_try_catch

View file

@ -7,11 +7,11 @@ g = Grok(b);
s.x = 3; s.x = 3;
if (s.getx() != 3) if (s.getx() != 3)
error error("failed");
endif endif
g.x = 4; g.x = 4;
if (g.getx() != 4) if (g.getx() != 4)
error error("failed");
endif endif

View file

@ -7,12 +7,12 @@ g = Grok(b);
s.x = 3; s.x = 3;
if (s.getx() != 3) if (s.getx() != 3)
error error("failed");
endif endif
g.x = 4; g.x = 4;
if (g.getx() != 4) if (g.getx() != 4)
error error("failed");
endif endif

View file

@ -10,23 +10,23 @@ b = Bar(f);
if (f.test(3) != 1) if (f.test(3) != 1)
error error("failed");
endif endif
if (f.test(3.5) != 2) if (f.test(3.5) != 2)
error error("failed");
endif endif
if (f.test("hello") != 3) if (f.test("hello") != 3)
error error("failed");
endif endif
if (b.test(3) != 1) if (b.test(3) != 1)
error error("failed");
endif endif
if (b.test(3.5) != 2) if (b.test(3.5) != 2)
error error("failed");
endif endif
if (b.test("hello") != 3) if (b.test("hello") != 3)
error error("failed");
endif endif

View file

@ -9,14 +9,14 @@ f = Foo();
b = Bar(f); b = Bar(f);
if (b.test() != 3) if (b.test() != 3)
error error("failed");
endif endif
if (b.ftest1(1) != 1) if (b.ftest1(1) != 1)
error error("failed");
endif endif
if (b.ftest2(2,3) != 2) if (b.ftest2(2,3) != 2)
error error("failed");
endif endif

View file

@ -10,11 +10,11 @@ b = Bar(f);
b.x = 3; b.x = 3;
if (b.getx() != 3) if (b.getx() != 3)
error error("failed");
endif endif
fp = b.__deref__(); fp = b.__deref__();
fp.x = 4; fp.x = 4;
if (fp.getx() != 4) if (fp.getx() != 4)
error error("failed");
endif endif

View file

@ -3,17 +3,17 @@ smart_pointer_templatevariables
d = DiffImContainerPtr_D(create(1234, 5678)); d = DiffImContainerPtr_D(create(1234, 5678));
if (d.id != 1234) if (d.id != 1234)
error error("failed");
endif endif
#if (d.xyz != 5678): #if (d.xyz != 5678):
# error # error("failed");
d.id = 4321; d.id = 4321;
#d.xyz = 8765 #d.xyz = 8765
if (d.id != 4321) if (d.id != 4321)
error error("failed");
endif endif
#if (d.xyz != 8765): #if (d.xyz != 8765):
# error # error("failed");

View file

@ -10,11 +10,11 @@ b = Bar(f);
b.x = 3; b.x = 3;
if (b.getx() != 3) if (b.getx() != 3)
error error("failed");
endif endif
fp = b.__deref__(); fp = b.__deref__();
fp.x = 4; fp.x = 4;
if (fp.getx() != 4) if (fp.getx() != 4)
error error("failed");
endif endif

View file

@ -18,6 +18,6 @@ end_try_catch
if (Foo.BAZ.val != 2*Foo.BAR.val) if (Foo.BAZ.val != 2*Foo.BAR.val)
error error("failed");
endif endif

View file

@ -132,7 +132,7 @@ s.append(3);
j=1; j=1;
for i in s, for i in s,
if (i != j) if (i != j)
error error("failed");
endif endif
j = j + 1; j = j + 1;
endfor endfor

View file

@ -9,10 +9,10 @@ b = struct_value.Bar();
b.a.x = 3; b.a.x = 3;
if (b.a.x != 3) if (b.a.x != 3)
error error("failed");
endif endif
b.b.x = 3; b.b.x = 3;
if (b.b.x != 3) if (b.b.x != 3)
error error("failed");
endif endif

View file

@ -11,7 +11,7 @@ a1 = a_ptr(a);
a2 = a_ptr(a); a2 = a_ptr(a);
if (swig_this(a1) != swig_this(a2)) if (swig_this(a1) != swig_this(a2))
error error("failed");
endif endif
@ -20,7 +20,7 @@ xstr1 = printf("0x%x",lthis);
xstr2 = pointer_str(a); xstr2 = pointer_str(a);
if (xstr1 != xstr2) if (xstr1 != xstr2)
error error("failed");
endif endif
s = str(a.this); s = str(a.this);
@ -29,5 +29,5 @@ r = repr(a.this);
v1 = v_ptr(a); v1 = v_ptr(a);
v2 = v_ptr(a); v2 = v_ptr(a);
if (uint64(v1) != uint64(v2)) if (uint64(v1) != uint64(v2))
error error("failed");
endif endif

View file

@ -9,9 +9,9 @@ a = template_extend1.lBaz();
b = template_extend1.dBaz(); b = template_extend1.dBaz();
if (!strcmp(a.foo(),"lBaz::foo")) if (!strcmp(a.foo(),"lBaz::foo"))
error error("failed");
endif endif
if (!strcmp(b.foo(),"dBaz::foo")) if (!strcmp(b.foo(),"dBaz::foo"))
error error("failed");
endif endif

View file

@ -9,9 +9,9 @@ a = template_extend2.lBaz();
b = template_extend2.dBaz(); b = template_extend2.dBaz();
if (!strcmp(a.foo(),"lBaz::foo")) if (!strcmp(a.foo(),"lBaz::foo"))
error error("failed");
endif endif
if (!strcmp(b.foo(),"dBaz::foo")) if (!strcmp(b.foo(),"dBaz::foo"))
error error("failed");
endif endif

View file

@ -12,62 +12,62 @@ e = FooUInt();
f = BarUInt(); f = BarUInt();
if (!strcmp(a.blah(),"Foo")) if (!strcmp(a.blah(),"Foo"))
error error("failed");
endif endif
if (!strcmp(b.blah(),"Foo")) if (!strcmp(b.blah(),"Foo"))
error error("failed");
endif endif
if (!strcmp(e.blah(),"Foo")) if (!strcmp(e.blah(),"Foo"))
error error("failed");
endif endif
if (!strcmp(c.blah(),"Bar")) if (!strcmp(c.blah(),"Bar"))
error error("failed");
endif endif
if (!strcmp(d.blah(),"Bar")) if (!strcmp(d.blah(),"Bar"))
error error("failed");
endif endif
if (!strcmp(f.blah(),"Bar")) if (!strcmp(f.blah(),"Bar"))
error error("failed");
endif endif
if (!strcmp(c.foomethod(),"foomethod")) if (!strcmp(c.foomethod(),"foomethod"))
error error("failed");
endif endif
if (!strcmp(d.foomethod(),"foomethod")) if (!strcmp(d.foomethod(),"foomethod"))
error error("failed");
endif endif
if (!strcmp(f.foomethod(),"foomethod")) if (!strcmp(f.foomethod(),"foomethod"))
error error("failed");
endif endif
if (!strcmp(invoke_blah_int(a),"Foo")) if (!strcmp(invoke_blah_int(a),"Foo"))
error error("failed");
endif endif
if (!strcmp(invoke_blah_int(c),"Bar")) if (!strcmp(invoke_blah_int(c),"Bar"))
error error("failed");
endif endif
if (!strcmp(invoke_blah_double(b),"Foo")) if (!strcmp(invoke_blah_double(b),"Foo"))
error error("failed");
endif endif
if (!strcmp(invoke_blah_double(d),"Bar")) if (!strcmp(invoke_blah_double(d),"Bar"))
error error("failed");
endif endif
if (!strcmp(invoke_blah_uint(e),"Foo")) if (!strcmp(invoke_blah_uint(e),"Foo"))
error error("failed");
endif endif
if (!strcmp(invoke_blah_uint(f),"Bar")) if (!strcmp(invoke_blah_uint(f),"Bar"))
error error("failed");
endif endif

View file

@ -7,5 +7,5 @@ template_ns4
d = make_Class_DD(); d = make_Class_DD();
if (!strcmp(d.test(),"test")) if (!strcmp(d.test(),"test"))
error error("failed");
endif endif

View file

@ -3,19 +3,19 @@ p1 = pairii(2,3);
p2 = pairii(p1); p2 = pairii(p1);
if (p2.first != 2) if (p2.first != 2)
error error("failed");
endif endif
if (p2.second != 3) if (p2.second != 3)
error error("failed");
endif endif
p3 = pairdd(3.5,2.5); p3 = pairdd(3.5,2.5);
p4 = pairdd(p3); p4 = pairdd(p3);
if (p4.first != 3.5) if (p4.first != 3.5)
error error("failed");
endif endif
if (p4.second != 2.5) if (p4.second != 2.5)
error error("failed");
endif endif

View file

@ -2,5 +2,5 @@ template_tbase_template
a = make_Class_dd(); a = make_Class_dd();
if (!strcmp(a.test(),"test")) if (!strcmp(a.test(),"test"))
error error("failed");
endif endif

View file

@ -15,7 +15,7 @@ end_try_catch
if (strfind('ArithUnaryFunction',swig_type(d)) != 1) if (strfind('ArithUnaryFunction',swig_type(d)) != 1)
d d
error("is not an ArithUnaryFunction") error("is not an ArithUnaryFunction")
error error("failed");
endif endif
try try
@ -77,7 +77,7 @@ end_try_catch
if (strfind('ArithUnaryFunction',swig_type(g)) != 1) if (strfind('ArithUnaryFunction',swig_type(g)) != 1)
g g
error("is not an ArithUnaryFunction") error("is not an ArithUnaryFunction")
error error("failed");
endif endif
@ -98,6 +98,6 @@ try
a = g.get_value(); a = g.get_value();
catch catch
error(g, "has not get_value() method") error(g, "has not get_value() method")
error error("failed");
end_try_catch end_try_catch

View file

@ -8,7 +8,7 @@ try
a = swig_this(d); a = swig_this(d);
a = swig_this(c); a = swig_this(c);
catch catch
error error("failed");
end_try_catch end_try_catch
try try
@ -37,15 +37,15 @@ end_try_catch
# the old large format # the old large format
if (strcmp("<unknown>",swig_typequery("vfncs::ArithUnaryFunction<vfncs::arith_traits<float,double>::argument_type,vfncs::arith_traits<float,double >::result_type > *"))) if (strcmp("<unknown>",swig_typequery("vfncs::ArithUnaryFunction<vfncs::arith_traits<float,double>::argument_type,vfncs::arith_traits<float,double >::result_type > *")))
error error("failed");
endif endif
# the reduced format # the reduced format
if (strcmp("<unknown>",swig_typequery("vfncs::ArithUnaryFunction<double,double> *"))) if (strcmp("<unknown>",swig_typequery("vfncs::ArithUnaryFunction<double,double> *")))
error error("failed");
endif endif
# this is a bad name # this is a bad name
if (!strcmp("<unknown>",swig_typequery("vfncs::ArithUnaryFunction<double,doublex> *"))) if (!strcmp("<unknown>",swig_typequery("vfncs::ArithUnaryFunction<double,doublex> *")))
error error("failed");
endif endif

View file

@ -1,10 +1,10 @@
typemap_namespace typemap_namespace
if (!strcmp(test1("hello"),"hello")) if (!strcmp(test1("hello"),"hello"))
error error("failed");
endif endif
if (!strcmp(test2("hello"),"hello")) if (!strcmp(test2("hello"),"hello"))
error error("failed");
endif endif

View file

@ -1,5 +1,5 @@
typemap_ns_using typemap_ns_using
if (typemap_ns_using.spam(37) != 37) if (typemap_ns_using.spam(37) != 37)
error error("failed");
endif endif

View file

@ -3,13 +3,13 @@ types_directive
d1 = Time1(2001, 2, 3, 60); d1 = Time1(2001, 2, 3, 60);
newDate = add(d1, 7); # check that a Time1 instance is accepted where Date is expected newDate = add(d1, 7); # check that a Time1 instance is accepted where Date is expected
if (newDate.day != 10) if (newDate.day != 10)
error error("failed");
endif endif
d2 = Time2(1999, 8, 7, 60); d2 = Time2(1999, 8, 7, 60);
newDate = add(d2, 7); # check that a Time2 instance is accepted where Date is expected newDate = add(d2, 7); # check that a Time2 instance is accepted where Date is expected
if (newDate.day != 14) if (newDate.day != 14)
error error("failed");
endif endif

View file

@ -6,5 +6,5 @@ endif
using1 using1
if (using1.spam(37) != 37) if (using1.spam(37) != 37)
error error("failed");
endif endif

View file

@ -6,5 +6,5 @@ endif
using2 using2
if (using2.spam(37) != 37) if (using2.spam(37) != 37)
error error("failed");
endif endif

View file

@ -10,23 +10,23 @@ dc = d.copy();
ic = i.copy(); ic = i.copy();
if (d.get() != dc.get()) if (d.get() != dc.get())
error error("failed");
endif endif
if (i.get() != ic.get()) if (i.get() != ic.get())
error error("failed");
endif endif
virtual_poly.incr(ic); virtual_poly.incr(ic);
if ((i.get() + 1) != ic.get()) if ((i.get() + 1) != ic.get())
error error("failed");
endif endif
dr = d.ref_this(); dr = d.ref_this();
if (d.get() != dr.get()) if (d.get() != dr.get())
error error("failed");
endif endif
@ -35,10 +35,10 @@ endif
# #
ddc = virtual_poly.NDouble_narrow(d.nnumber()); ddc = virtual_poly.NDouble_narrow(d.nnumber());
if (d.get() != ddc.get()) if (d.get() != ddc.get())
error error("failed");
endif endif
dic = virtual_poly.NInt_narrow(i.nnumber()); dic = virtual_poly.NInt_narrow(i.nnumber());
if (i.get() != dic.get()) if (i.get() != dic.get())
error error("failed");
endif endif

View file

@ -27,16 +27,16 @@ end_try_catch
v1 = voidtest.vfunc1(f); v1 = voidtest.vfunc1(f);
v2 = voidtest.vfunc2(f); v2 = voidtest.vfunc2(f);
if (swig_this(v1) != swig_this(v2)) if (swig_this(v1) != swig_this(v2))
error error("failed");
endif endif
v3 = voidtest.vfunc3(v1); v3 = voidtest.vfunc3(v1);
if (swig_this(v3) != swig_this(f)) if (swig_this(v3) != swig_this(f))
error error("failed");
endif endif
v4 = voidtest.vfunc1(f); v4 = voidtest.vfunc1(f);
if (swig_this(v4) != swig_this(v1)) if (swig_this(v4) != swig_this(v1))
error error("failed");
endif endif