diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-26 11:51:32 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-06-26 11:51:32 -0700 |
commit | 4d0be84d50307689f6b15f9f4502255736e522db (patch) | |
tree | fe3ff72a4dadb4de3cd6899ff933615402c8e4b2 | |
parent | deacdfa1297cb3bbbb8aedb439f52aae11571630 (diff) |
fix test_debug
-rwxr-xr-x | tests/runner.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/runner.py b/tests/runner.py index c55c96fd..46dc5e11 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -9570,20 +9570,18 @@ def process(filename): } ''' try: - post = r''' -def process(filename): - lines = open(filename, 'r').readlines() - lines = filter(lambda line: '___assert_fail(' in line or '___assert_func(' in line, lines) - found_line_num = any(('//@line 7 "' in line) for line in lines) - found_filename = any(('src.cpp"\n' in line) for line in lines) - assert found_line_num, 'Must have debug info with the line number' - assert found_filename, 'Must have debug info with the filename' -''' - self.do_run(src, '*nothingatall*', post_build=post) + self.do_run(src, '*nothingatall*') except Exception, e: # This test *should* fail assert 'Assertion failed: x < 15' in str(e), str(e) + lines = open('src.cpp.o.js', 'r').readlines() + lines = filter(lambda line: '___assert_fail(' in line or '___assert_func(' in line, lines) + found_line_num = any(('//@line 7 "' in line) for line in lines) + found_filename = any(('src.cpp"\n' in line) for line in lines) + assert found_line_num, 'Must have debug info with the line number' + assert found_filename, 'Must have debug info with the filename' + def test_source_map(self): if Settings.USE_TYPED_ARRAYS != 2: return self.skip("doesn't pass without typed arrays") if NODE_JS not in JS_ENGINES: return self.skip('sourcemapper requires Node to run') |