diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-24 09:14:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-24 09:14:54 -0700 |
commit | 087231e369f5fc44b26be5db1b86af378a67028d (patch) | |
tree | fa782c1bd852cdb6bc267b71149a024ca1b6078c /tests | |
parent | 9971952dd5199c0b202397ae7d45d7c686c477ef (diff) |
auto-generate library stubs that abort for missing library functions, and implement DEAD_FUNCTIONS that way
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py index a66ef75d..1a5e2b2b 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -8171,11 +8171,12 @@ def process(filename): # Kill off the dead function, still works and it is not emitted Settings.DEAD_FUNCTIONS = ['_unused'] js = test('*9*') - assert 'function _unused(' not in js + assert 'function _unused($' not in js # no compiled code + assert 'function _unused(' in js # lib-generated stub Settings.DEAD_FUNCTIONS = [] # Run the same code with argc that uses the dead function, see abort - test(('dead:_unused' if Settings.ASSERTIONS else 'abort', 'is not a function'), args=['a', 'b'], no_build=True) + test(('missing library function: unused'), args=['a', 'b'], no_build=True) # Normal stuff run_all('normal', r''' |