summaryrefslogtreecommitdiff
path: root/Examples/test-suite/javascript/cpp11_using_typedef_struct_runme.js
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2023-05-05 23:23:42 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2023-05-06 11:13:23 +0100
commit65be8812959aa0d2e9805e31549bbeac0cc89691 (patch)
tree0f7d8762c507517905f5344f57db725e96c263eb /Examples/test-suite/javascript/cpp11_using_typedef_struct_runme.js
parent33b483492008b05b0625efb62cebb9ad5ae0638f (diff)
downloadswig-65be8812959aa0d2e9805e31549bbeac0cc89691.tar.gz
Partial revert of previous commit for typedefs
Setting current symbol table for a typedef seems wrong. No difference to test-suite though. Testcase rename for C++11 testing and minor adjustments. Issue #2550 Closes #2551
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.js13
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');