diff options
Diffstat (limited to 'Examples/test-suite/javascript/cpp11_using_typedef_struct_runme.js')
-rw-r--r-- | Examples/test-suite/javascript/cpp11_using_typedef_struct_runme.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Examples/test-suite/javascript/cpp11_using_typedef_struct_runme.js b/Examples/test-suite/javascript/cpp11_using_typedef_struct_runme.js new file mode 100644 index 000000000..43a26ddcd --- /dev/null +++ b/Examples/test-suite/javascript/cpp11_using_typedef_struct_runme.js @@ -0,0 +1,13 @@ +var cpp11_using_typedef_struct = require("cpp11_using_typedef_struct"); + +var b = new cpp11_using_typedef_struct.AffineMatrix(); +b.x = b.y = b.z = 1; + +if (cpp11_using_typedef_struct.fn1(b) != b.x) + throw new Error('failed'); + +var bb = new cpp11_using_typedef_struct._xCacheView(); +bb.x = 123; + +if (cpp11_using_typedef_struct.fn2(bb) != 123) + throw new Error('failed'); |