def test_exported_response(self):
    src = '\n      #include <stdio.h>\n      #include <stdlib.h>\n      #include <emscripten.h>\n\n      extern "C" {\n        int other_function() { return 5; }\n      }\n\n      int main() {\n        int x = EM_ASM_INT({ return Module._other_function() });\n        emscripten_run_script_string(""); // Add a reference to a symbol that exists in src/deps_info.json to uncover issue #2836 in the test suite.\n        printf("waka %d!\\n", x);\n        return 0;\n      }\n    '
    create_test_file('exps', '["_main","_other_function"]')
    self.emcc_args += ['-s', 'EXPORTED_FUNCTIONS=@exps']
    self.do_run(src, 'waka 5!')
    assert ('other_function' in open('src.cpp.o.js').read())
def test_exported_response(self):
    src = '\n      #include <stdio.h>\n      #include <stdlib.h>\n      #include <emscripten.h>\n\n      extern "C" {\n        int other_function() { return 5; }\n      }\n\n      int main() {\n        int x = EM_ASM_INT({ return Module._other_function() });\n        emscripten_run_script_string(); // Add a reference to a symbol that exists in src/deps_info.json to uncover issue #2836 in the test suite.\n        printf("waka %d!\\n", x);\n        return 0;\n      }\n    '
    create_test_file('exps', '["_main","_other_function"]')
    self.emcc_args += ['-s', 'EXPORTED_FUNCTIONS=@exps']
    self.do_run(src, 'waka 5!')
    assert ('other_function' in open('src.cpp.o.js').read())