aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/embind/embind.test.js18
-rw-r--r--tests/embind/embind_test.cpp22
2 files changed, 0 insertions, 40 deletions
diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js
index 82029de4..5af15be9 100755
--- a/tests/embind/embind.test.js
+++ b/tests/embind/embind.test.js
@@ -1478,24 +1478,6 @@ module({
});
});
- BaseFixture.extend("JavaScript interface", function() {
- this.setUp(function() {
- this.testobj = {
- "method1": function() { return 111; },
- "method2": function() { return 222; }
- };
- });
-
- test("pass js object to c++ and call its method", function() {
- var obj = new cm.JSInterfaceHolder(this.testobj);
- assert.equal(111, obj.callMethod("method1"));
- assert.equal(222, obj.callMethod("method2"));
- assert.equal(111, obj.callMethodUsingSharedPtr("method1"));
- assert.equal(222, obj.callMethodUsingSharedPtr("method2"));
- obj.delete();
- });
- });
-
BaseFixture.extend("abstract methods", function() {
test("can call abstract methods", function() {
var obj = cm.getAbstractClass();
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp
index ce133112..5733c08f 100644
--- a/tests/embind/embind_test.cpp
+++ b/tests/embind/embind_test.cpp
@@ -1065,20 +1065,6 @@ std::vector<std::shared_ptr<StringHolder>> emval_test_return_shared_ptr_vector()
return sharedStrVector;
}
-class JSInterfaceHolder {
-public:
- JSInterfaceHolder(JSInterface &jsobj) : jsobj_(jsobj) {
- ptr_ = JSInterface::cloneToSharedPtr(jsobj_);
- }
-
- int callMethod(std::string method) { return jsobj_.call<int>(method.c_str()); }
- int callMethodUsingSharedPtr(std::string method) { return ptr_->call<int>(method.c_str()); }
-
-private:
- JSInterface jsobj_;
- std::shared_ptr<JSInterface> ptr_;
-};
-
void test_string_with_vec(const std::string& p1, std::vector<std::string>& v1) {
// THIS DOES NOT WORK -- need to get as val and then call vecFromJSArray
printf("%s\n", p1.c_str());
@@ -1488,8 +1474,6 @@ EMSCRIPTEN_BINDINGS(constants) {
}
EMSCRIPTEN_BINDINGS(tests) {
- register_js_interface();
-
register_vector<int>("IntegerVector");
register_vector<char>("CharVector");
register_vector<unsigned>("VectorUnsigned");
@@ -1883,12 +1867,6 @@ EMSCRIPTEN_BINDINGS(tests) {
register_map<std::string, int>("StringIntMap");
function("embind_test_get_string_int_map", embind_test_get_string_int_map);
- class_<JSInterfaceHolder>("JSInterfaceHolder")
- .constructor<JSInterface&>()
- .function("callMethod", &JSInterfaceHolder::callMethod)
- .function("callMethodUsingSharedPtr", &JSInterfaceHolder::callMethodUsingSharedPtr)
- ;
-
function("embind_test_new_Object", &embind_test_new_Object);
function("embind_test_new_factory", &embind_test_new_factory);