diff options
author | Jez Ng <me@jezng.com> | 2013-06-19 11:22:35 -0700 |
---|---|---|
committer | Jez Ng <me@jezng.com> | 2013-06-19 14:15:18 -0700 |
commit | d680f5e81b4bae6cbc46ba04b24c5809679d0bcc (patch) | |
tree | d96043802f514e2bc75a0e458a9aa655a6cb52de /tests/runner.py | |
parent | 050335fd91a09cde7ccea9f1fc0ecf536918b95a (diff) |
Implement source maps for optimized builds.
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/runner.py b/tests/runner.py index 63f5048a..1697294d 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -9585,21 +9585,21 @@ def process(filename): assert 'Assertion failed' in str(e), str(e) def test_source_map(self): + if Settings.USE_TYPED_ARRAYS != 2: return self.skip("doesn't pass without typed arrays") if '-g' not in Building.COMPILER_TEST_OPTS: Building.COMPILER_TEST_OPTS.append('-g') - if self.emcc_args is not None: - if '-O1' in self.emcc_args or '-O2' in self.emcc_args: return self.skip('optimizations remove LLVM debug info') src = ''' #include <stdio.h> #include <assert.h> - int foo() { - return 1; // line 6 + __attribute__((noinline)) int foo() { + printf("hi"); // line 6 + return 1; // line 7 } int main() { - int i = foo(); // line 10 - return 0; // line 11 + printf("%d", foo()); // line 11 + return 0; // line 12 } ''' @@ -9621,7 +9621,7 @@ def process(filename): self.assertIdentical(src_filename, m['source']) seen_lines.add(m['originalLine']) # ensure that all the 'meaningful' lines in the original code get mapped - assert seen_lines.issuperset([6, 10, 11]) + assert seen_lines.issuperset([6, 7, 11, 12]) self.build(src, dirname, src_filename, post_build=(None,post)) |