aboutsummaryrefslogtreecommitdiff
path: root/tests/embind/embind_test.cpp
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-04-03 17:28:11 -0700
committerJukka Jylänki <jujjyl@gmail.com>2013-04-12 14:27:18 +0300
commitd4bf6fbe297ea7e5720b49bfa6fc58b696540144 (patch)
treeae9490c3bb37aef5afa0a4f9c25ee5b05edd8a6c /tests/embind/embind_test.cpp
parent616b5c3579556c5e1be6ba1063c132680d9e2d43 (diff)
Add support for global constants.
Diffstat (limited to 'tests/embind/embind_test.cpp')
-rw-r--r--tests/embind/embind_test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp
index 0ae1801a..4d1b376b 100644
--- a/tests/embind/embind_test.cpp
+++ b/tests/embind/embind_test.cpp
@@ -1352,6 +1352,16 @@ int overloaded_function(int i, int j)
return 2;
}
+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);
+}
+
EMSCRIPTEN_BINDINGS(tests) {
register_js_interface();