aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/javascript/smart_pointer_simple_runme.js
blob: e00dcefb724801914851185111f5e65b1c205df6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var smart_pointer_simple = require("smart_pointer_simple");

f = new smart_pointer_simple.Foo();
b = new smart_pointer_simple.Bar(f);

b.x = 3;
if (b.getx() != 3) {
    throw new Error;
}

fp = b.__deref__();
fp.x = 4;
if (fp.getx() != 4) {
    throw new Error;
}