def test_embind_no_rtti_followed_by_rtti(self):
    create_test_file('pre.js', '\n      Module = {};\n      Module[\'postRun\'] = function() {\n        out("dotest retured: " + Module.dotest());\n      };\n    ')
    src = '\n      #include <emscripten/bind.h>\n      #include <emscripten/val.h>\n      #include <stdio.h>\n\n      int main(int argc, char** argv){\n        printf("418\\n");\n        return 0;\n      }\n\n      int test() {\n        return 42;\n      }\n\n      EMSCRIPTEN_BINDINGS(my_module) {\n        emscripten::function("dotest", &test);\n      }\n    '
    self.emcc_args += ['--bind', '-fno-rtti', '-frtti', '--pre-js', 'pre.js']
    self.do_run(src, '418\ndotest retured: 42\n')
def test_embind_no_rtti_followed_by_rtti(self):
    create_test_file('pre.js', '\n      Module = {};\n      Module[\'postRun\'] = function() {\n        out("dotest retured: " + Module.dotest());\n      };\n    ')
    src = '\n      #include <emscripten/bind.h>\n      #include <emscripten/val.h>\n      #include <stdio.h>\n\n      int main(int argc, char** argv){\n        printf("418\\n");\n        return 0;\n      }\n\n      int test() {\n        return 42;\n      }\n\n      EMSCRIPTEN_BINDINGS(my_module) {\n        emscripten::function("dotest", &test);\n      }\n    '
    self.emcc_args += ['--bind', '-fno-rtti', '-frtti', '--pre-js', 'pre.js']
    self.do_run(src, '418\ndotest retured: 42\n')