summaryrefslogtreecommitdiff
path: root/Examples/test-suite/octave/smart_pointer_simple_runme.m
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/octave/smart_pointer_simple_runme.m')
-rw-r--r--Examples/test-suite/octave/smart_pointer_simple_runme.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/Examples/test-suite/octave/smart_pointer_simple_runme.m b/Examples/test-suite/octave/smart_pointer_simple_runme.m
new file mode 100644
index 0000000..26f32e0
--- /dev/null
+++ b/Examples/test-suite/octave/smart_pointer_simple_runme.m
@@ -0,0 +1,15 @@
+smart_pointer_simple
+
+f = Foo();
+b = Bar(f);
+
+b.x = 3;
+if (b.getx() != 3)
+ error
+endif
+
+fp = b.__deref__();
+fp.x = 4;
+if (fp.getx() != 4)
+ error
+endif