diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-05-14 11:02:20 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-05-14 11:02:20 -0700 |
commit | e1ea1076ab66da581dc9472df232984d8f230f28 (patch) | |
tree | 60a46aa96581386a2ac62bfd1d05363c09c05717 /tests/runner.py | |
parent | db3a765a9050790228f7ef8bec7779681dacb601 (diff) |
do not fail on -fcatch-undefined-behavior
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index d25bd2d3..126be5aa 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -6419,6 +6419,26 @@ f.close() # TODO: test normal project linking, static and dynamic: get_library should not need to be told what to link! # TODO: deprecate llvm optimizations, dlmalloc, etc. in emscripten.py. + def test_catch_undef(self): + open(os.path.join(self.get_dir(), 'test.cpp'), 'w').write(r''' + #include <vector> + #include <stdio.h> + + class Test { + public: + std::vector<int> vector; + }; + + Test globalInstance; + + int main() { + printf("hello, world!\n"); + return 1; + } + ''') + Popen(['python', EMCC, os.path.join(self.get_dir(), 'test.cpp'), '-fcatch-undefined-behavior']).communicate() + self.assertContained('hello, world!', run_js(os.path.join(self.get_dir(), 'a.out.js'))) + def test_l_link(self): # Linking with -lLIBNAME and -L/DIRNAME should work |