diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-22 13:21:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-06-22 14:21:19 -0700 |
commit | 369167ebda362eb0c76081976ae0a48d2d3c1cbd (patch) | |
tree | ac29adc3fffd6604ba2101dac6e328bdacba5fcf /tests | |
parent | 8f1a7e5546f5b10263c176e507dba8d548161c86 (diff) |
-gLEVEL ; support varying degrees of debuggability
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/runner.py b/tests/runner.py index bcd8e84c..f8ca4343 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -10160,8 +10160,8 @@ Options that are modified or new in %s include: assert 'SAFE_HEAP' not in generated, 'safe heap should not be used by default' assert ': while(' not in generated, 'when relooping we also js-optimize, so there should be no labelled whiles' if closure: - if opt_level <= 1: assert 'Module._main =' in generated, 'closure compiler should have been run' - elif opt_level >= 2: assert 'Module._main=' in generated, 'closure compiler should have been run (and output should be minified)' + if opt_level == 0: assert 'Module._main =' in generated, 'closure compiler should have been run' + elif opt_level >= 1: assert 'Module._main=' in generated, 'closure compiler should have been run (and output should be minified)' else: # closure has not been run, we can do some additional checks. TODO: figure out how to do these even with closure assert 'Module._main = ' not in generated, 'closure compiler should not have been run' @@ -10172,7 +10172,7 @@ Options that are modified or new in %s include: if opt_level >= 2 and '-g' in params: assert re.search('HEAP8\[\$?\w+ ?\+ ?\(+\$?\w+ ?', generated) or re.search('HEAP8\[HEAP32\[', generated), 'eliminator should create compound expressions, and fewer one-time vars' # also in -O1, but easier to test in -O2 assert ('_puts(' in generated) == (opt_level >= 1), 'with opt >= 1, llvm opts are run and they should optimize printf to puts' - if opt_level <= 1 or '-g' in params: assert 'function _main() {' in generated, 'Should be unminified, including whitespace' + if opt_level == 0 or '-g' in params: assert 'function _main() {' in generated, 'Should be unminified, including whitespace' elif opt_level >= 2: assert ('function _main(){' in generated or '"use asm";var a=' in generated), 'Should be whitespace-minified' # emcc -s RELOOP=1 src.cpp ==> should pass -s to emscripten.py. --typed-arrays is a convenient alias for -s USE_TYPED_ARRAYS |