Files
ANSLibs/swig-4.3.0/Examples/test-suite/octave/smart_pointer_simple_runme.m

21 lines
289 B
Mathematica
Raw Permalink Normal View History

# do not dump Octave core
if exist("crash_dumps_octave_core", "builtin")
crash_dumps_octave_core(0);
endif
smart_pointer_simple
f = Foo();
b = Bar(f);
b.x = 3;
if (b.getx() != 3)
error("failed");
endif
fp = b.__deref__();
fp.x = 4;
if (fp.getx() != 4)
error("failed");
endif