*** empty log message ***

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4516 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Logan Johnson 2003-03-11 20:27:13 +00:00
commit d5f12d8002
3 changed files with 83 additions and 37 deletions

View file

@ -0,0 +1,35 @@
require 'template_typedef_cplx3'
include Template_typedef_cplx3
#
# this is OK
#
s = Sin.new
s.get_base_value()
s.get_value()
s.get_arith_value()
my_func_r(s)
make_Multiplies_double_double_double_double(s,s)
z = CSin.new
z.get_base_value()
z.get_value()
z.get_arith_value()
my_func_c(z)
make_Multiplies_complex_complex_complex_complex(z,z)
#
# Here we fail
#
d = make_Identity_double()
my_func_r(d)
c = make_Identity_complex()
my_func_c(c)

View file

@ -0,0 +1,35 @@
require 'template_typedef_cplx4'
include Template_typedef_cplx4
#
# this is OK
#
s = Sin.new
s.get_base_value()
s.get_value()
s.get_arith_value()
my_func_r(s)
make_Multiplies_double_double_double_double(s,s)
z = CSin.new
z.get_base_value()
z.get_value()
z.get_arith_value()
my_func_c(z)
make_Multiplies_complex_complex_complex_complex(z,z)
#
# Here we fail
#
d = make_Identity_double()
my_func_r(d)
c = make_Identity_complex()
my_func_c(c)

View file

@ -6,24 +6,17 @@ include Template_typedef_cplx
# double case # double case
# #
begin
d = make_Identity_double() d = make_Identity_double()
# a = d.this raise RuntimeError, "#{d} is not an instance" if d.is_a? SWIG::Pointer
rescue
raise RuntimeError, "#{d} is not an instance"
end
classname = d.class.name.split(/::/).last classname = d.class.name.split(/::/).last
unless classname =~ /ArithUnaryFunction/ unless classname =~ /ArithUnaryFunction/
raise RuntimeError, "#{d} is not an ArithUnaryFunction" raise RuntimeError, "#{d} is not an ArithUnaryFunction"
end end
begin e = make_Multiplies_double_double_double_double(d, d)
e = make_Multiplies_double_double_double_double(d, d) raise RuntimeError, "#{e} is not an instance" if e.is_a? SWIG::Pointer
# a = e.this
rescue
raise RuntimeError, "#{e} is not an instance"
end
classname = e.class.name.split(/::/).last classname = e.class.name.split(/::/).last
unless classname =~ /ArithUnaryFunction/ unless classname =~ /ArithUnaryFunction/
@ -35,24 +28,16 @@ end
# complex case # complex case
# #
begin c = make_Identity_complex()
c = make_Identity_complex() raise RuntimeError, "#{c}is not an instance" if c.is_a? SWIG::Pointer
# a = c.this
rescue
raise RuntimeError, "#{c}is not an instance"
end
classname = c.class.name.split(/::/).last classname = c.class.name.split(/::/).last
unless classname =~ /ArithUnaryFunction/ unless classname =~ /ArithUnaryFunction/
raise RuntimeError, "#{c} is not an ArithUnaryFunction" raise RuntimeError, "#{c} is not an ArithUnaryFunction"
end end
begin f = make_Multiplies_complex_complex_complex_complex(c, c)
f = make_Multiplies_complex_complex_complex_complex(c, c) raise RuntimeError, "{f} is not an instance" if f.is_a? SWIG::Pointer
# a = f.this
rescue
raise RuntimeError, "{f} is not an instance"
end
classname = f.class.name.split(/::/).last classname = f.class.name.split(/::/).last
unless classname =~ /ArithUnaryFunction/ unless classname =~ /ArithUnaryFunction/
@ -63,25 +48,16 @@ end
# Mix case # Mix case
# #
begin g = make_Multiplies_double_double_complex_complex(d, c)
g = make_Multiplies_double_double_complex_complex(d, c) raise RuntimeError, "#{g} is not an instance" if g.is_a? SWIG::Pointer
# a = g.this
rescue
raise RuntimeError, "#{g} is not an instance"
end
classname = g.class.name.split(/::/).last classname = g.class.name.split(/::/).last
unless classname =~ /ArithUnaryFunction/ unless classname =~ /ArithUnaryFunction/
raise RuntimeError, "#{g} is not an ArithUnaryFunction" raise RuntimeError, "#{g} is not an ArithUnaryFunction"
end end
h = make_Multiplies_complex_complex_double_double(c, d)
begin raise RuntimeError, "#{h} is not an instance" if h.is_a? SWIG::Pointer
h = make_Multiplies_complex_complex_double_double(c, d)
# a = h.this
rescue
raise RuntimeError, "#{h} is not an instance"
end
classname = h.class.name.split(/::/).last classname = h.class.name.split(/::/).last
unless classname =~ /ArithUnaryFunction/ unless classname =~ /ArithUnaryFunction/