summaryrefslogtreecommitdiff
path: root/Examples/test-suite/octave/smart_pointer_multi_runme.m
blob: ea15d04b960f7f5716c43b18517686d8624b2c77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
smart_pointer_multi

f = Foo();
b = Bar(f);
s = Spam(b);
g = Grok(b);

s.x = 3;
if (s.getx() != 3)
    error("failed");
endif

g.x = 4;
if (g.getx() != 4)
    error("failed");
endif