diff options
Diffstat (limited to 'tests/embind/embind_test.cpp')
-rw-r--r-- | tests/embind/embind_test.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp index dc052d1a..485cdfcd 100644 --- a/tests/embind/embind_test.cpp +++ b/tests/embind/embind_test.cpp @@ -233,6 +233,24 @@ void emval_test_call_function(val v, int i, float f, TupleVector tv, StructVecto v(i, f, tv, sv);
}
+void optional_test_copy() {
+ using emscripten::internal::optional;
+
+ optional<int> foo = 22;
+ optional<int> bar(foo);
+
+ return bool(bar);
+}
+
+void optional_test_copy2() {
+ using emscripten::internal::optional;
+
+ optional<int> foo;
+ optional<int> bar(foo);
+
+ return bool(bar);
+}
+
EMSCRIPTEN_BINDINGS(([]() {
function("mallinfo", &emval_test_mallinfo);
@@ -337,4 +355,7 @@ EMSCRIPTEN_BINDINGS(([]() { function("emval_test_call_method3", &emval_test_call_method3);
function("emval_test_call_function", &emval_test_call_function);
+
+ function('optional_test_copy', &optional_test_copy);
+ function('optional_test_copy2', &optional_test_copy2);
}));
|