def test_embind(self):
    self.emcc_args += ['--bind']
    src = '\n      #include <stdio.h>\n      #include <emscripten/val.h>\n\n      using namespace emscripten;\n\n      int main() {\n        val Math = val::global("Math");\n\n        // two ways to call Math.abs\n        printf("abs(-10): %d\\n", Math.call<int>("abs", -10));\n        printf("abs(-11): %d\\n", Math["abs"](-11).as<int>());\n\n        return 0;\n      }\n    '
    self.do_run(src, 'abs(-10): 10\nabs(-11): 11')
def test_embind(self):
    self.emcc_args += ['--bind']
    src = '\n      #include <stdio.h>\n      #include <emscripten/val.h>\n\n      using namespace emscripten;\n\n      int main() {\n        val Math = val::global("Math");\n\n        // two ways to call Math.abs\n        printf("abs(-10): %d\\n", Math.call<int>("abs", -10));\n        printf("abs(-11): %d\\n", Math["abs"](-11).as<int>());\n\n        return 0;\n      }\n    '
    self.do_run(src, 'abs(-10): 10\nabs(-11): 11')