def test_modularize_closure_pre(self):
    self.emcc_args += ['--pre-js', path_from_root('tests', 'core', 'modularize_closure_pre.js'), '--closure', '1', '-g1', '-s', 'MODULARIZE=1']

    def post(filename):
        with open(filename, 'a') as f:
            f.write('\n\n')
            f.write('var TheModule = Module();\n')
    self.do_run_in_out_file_test('tests', 'core', 'modularize_closure_pre', post_build=post)
def test_modularize_closure_pre(self):
    self.emcc_args += ['--pre-js', path_from_root('tests', 'core', 'modularize_closure_pre.js'), '--closure', '1', '-g1', '-s', 'MODULARIZE=1']

    def post(filename):
        with open(filename, 'a') as f:
            f.write('\n\n')
            f.write('var TheModule = Module();\n')
    self.do_run_in_out_file_test('tests', 'core', 'modularize_closure_pre', post_build=post)