swig/Examples/test-suite/octave/complextest_runme.m
William S Fulton e01cfd70c7 Add missing declaration for std::complex
Fixes missing type information for std::complex in scripting languages.
Closes #732.

Update Javascript and Octave complextest, although they don't actually
get run as they don't work
2017-10-02 19:07:24 +01:00

29 lines
543 B
Objective-C

# do not dump Octave core
if exist("crash_dumps_octave_core", "builtin")
crash_dumps_octave_core(0);
endif
complextest
a = complex(-1,2);
if (complextest.Conj(a) != a.conjugate())
error("bad complex mapping")
endif
if (complextest.Conjf(a) != a.conjugate())
error("bad complex mapping")
endif
if (complextest.Conj2(a) != a.conjugate())
error("bad complex mapping")
endif
if (complextest.Conjf2(a) != a.conjugate())
error("bad complex mapping")
endif
v = (complex(1,2), complex(2,3), complex(4,3), 1);
complextest.Copy_h(v);