@no_asan('ASan does not support custom memory allocators')
@no_lsan('LSan does not support custom memory allocators')
@parameterized({'normal': [], 'debug': ['-DEMMALLOC_DEBUG'], 'debug_log': ['-DEMMALLOC_DEBUG', '-DEMMALLOC_DEBUG_LOG', '-DRANDOM_ITERS=130']})
def test_emmalloc(self, *args):
    self.set_setting('MALLOC', 'none')
    self.emcc_args += (['-fno-builtin'] + list(args))
    self.do_run(((open(path_from_root('system', 'lib', 'emmalloc.cpp')).read() + open(path_from_root('system', 'lib', 'sbrk.c')).read()) + open(path_from_root('tests', 'core', 'test_emmalloc.cpp')).read()), open(path_from_root('tests', 'core', 'test_emmalloc.txt')).read())
@no_asan('ASan does not support custom memory allocators')
@no_lsan('LSan does not support custom memory allocators')
@parameterized({'normal': [], 'debug': ['-DEMMALLOC_DEBUG'], 'debug_log': ['-DEMMALLOC_DEBUG', '-DEMMALLOC_DEBUG_LOG', '-DRANDOM_ITERS=130']})
def test_emmalloc(self, *args):
    self.set_setting('MALLOC', 'none')
    self.emcc_args += (['-fno-builtin'] + list(args))
    self.do_run(((open(path_from_root('system', 'lib', 'emmalloc.cpp')).read() + open(path_from_root('system', 'lib', 'sbrk.c')).read()) + open(path_from_root('tests', 'core', 'test_emmalloc.cpp')).read()), open(path_from_root('tests', 'core', 'test_emmalloc.txt')).read())