aboutsummaryrefslogtreecommitdiff
path: root/tests/embind/embind_test.cpp
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-04-03 19:50:50 -0700
committerJukka Jylänki <jujjyl@gmail.com>2013-04-12 14:27:19 +0300
commitf508d6306ff0be4966d3f26b99a26c46f7c2c1ef (patch)
tree352dd1ce42319b225794db40ee510dc86743e36b /tests/embind/embind_test.cpp
parentd4bf6fbe297ea7e5720b49bfa6fc58b696540144 (diff)
Allow value_tuple and value_struct to be registered as global constants. This involved reworking how value_struct and value_tuple are registered.
Diffstat (limited to 'tests/embind/embind_test.cpp')
-rw-r--r--tests/embind/embind_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp
index 4d1b376b..be089f9f 100644
--- a/tests/embind/embind_test.cpp
+++ b/tests/embind/embind_test.cpp
@@ -1355,11 +1355,18 @@ int overloaded_function(int i, int j)
EMSCRIPTEN_BINDINGS(constants) {
constant("INT_CONSTANT", 10);
constant("STRING_CONSTANT", std::string("some string"));
+
TupleVector tv;
tv.x = 1;
tv.y = 2;
tv.z = 3;
constant("VALUE_TUPLE_CONSTANT", tv);
+
+ StructVector sv;
+ sv.x = 1;
+ sv.y = 2;
+ sv.z = 3;
+ constant("VALUE_STRUCT_CONSTANT", sv);
}
EMSCRIPTEN_BINDINGS(tests) {