MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / test_biggerswitch

Method test_biggerswitch

test/test_core.py:2301–2312  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2299 @no_wasm2js('massive switches can break js engines')
2300 @is_slow_test
2301 def test_biggerswitch(self):
2302 if self.is_optimizing():
2303 self.skipTest('https://github.com/emscripten-core/emscripten/issues/22179')
2304 if not self.is_optimizing():
2305 self.skipTest('nodejs takes >6GB to compile this if the wasm is not optimized, which OOMs, see https://github.com/emscripten-core/emscripten/issues/7928#issuecomment-458308453')
2306 num_cases = 20000
2307 switch_case = self.run_process([PYTHON, test_file('gen_large_switchcase.py'), str(num_cases)], stdout=PIPE, stderr=PIPE).stdout
2308 self.do_run(switch_case, '''58996: 589965899658996
230959297: 592975929759297
231059598: default
231159899: 598995989959899
2312Success!''')
2313
2314 @no_ubsan('local count too large for VMs')
2315 def test_indirectbr(self):

Callers

nothing calls this directly

Calls 4

is_optimizingMethod · 0.95
do_runMethod · 0.95
test_fileFunction · 0.90
run_processMethod · 0.80

Tested by

no test coverage detected