def test_no_declare_asm_module_exports(self):
    self.set_setting('DECLARE_ASM_MODULE_EXPORTS', 0)
    self.set_setting('WASM_ASYNC_COMPILATION', 0)
    self.maybe_closure()
    self.do_run(open(path_from_root('tests', 'declare_asm_module_exports.cpp')).read(), 'jsFunction: 1')
    js = open('src.cpp.o.js').read()
    occurances = js.count('cFunction')
    if (is_optimizing(self.emcc_args) and ('-g' not in self.emcc_args)):
        if self.is_wasm():
            self.assertEqual(occurances, 1)
        else:
            self.assertEqual(occurances, 2)
    else:
        print(occurances)
def test_no_declare_asm_module_exports(self):
    self.set_setting('DECLARE_ASM_MODULE_EXPORTS', 0)
    self.set_setting('WASM_ASYNC_COMPILATION', 0)
    self.maybe_closure()
    self.do_run(open(path_from_root('tests', 'declare_asm_module_exports.cpp')).read(), 'jsFunction: 1')
    js = open('src.cpp.o.js').read()
    occurances = js.count('cFunction')
    if (is_optimizing(self.emcc_args) and ('-g' not in self.emcc_args)):
        if self.is_wasm():
            self.assertEqual(occurances, 1)
        else:
            self.assertEqual(occurances, 2)
    else:
        print(occurances)