summaryrefslogtreecommitdiff
path: root/Examples/test-suite/octave/refcount_runme.m
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/octave/refcount_runme.m')
-rw-r--r--Examples/test-suite/octave/refcount_runme.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/Examples/test-suite/octave/refcount_runme.m b/Examples/test-suite/octave/refcount_runme.m
new file mode 100644
index 0000000..3ce5bcd
--- /dev/null
+++ b/Examples/test-suite/octave/refcount_runme.m
@@ -0,0 +1,15 @@
+refcount
+#
+# very innocent example
+#
+
+a = A3();
+b1 = B(a);
+b2 = B.create(a);
+
+
+if (a.ref_count() != 3)
+ error("This program will crash... now")
+endif
+
+