diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-18 11:35:00 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-18 11:35:00 -0800 |
commit | 20ce1c2c6e47303ad259b53dee7d2da5e308f496 (patch) | |
tree | 85b1b4a55761fe8d76426fd2797012b88609c5d6 /tests | |
parent | c381523b1c1916316f945404630a6e59f7de36b5 (diff) |
automatically use libcxx when needed
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hello_libcxx.cpp | 8 | ||||
-rw-r--r-- | tests/runner.py | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/hello_libcxx.cpp b/tests/hello_libcxx.cpp new file mode 100644 index 00000000..445c5513 --- /dev/null +++ b/tests/hello_libcxx.cpp @@ -0,0 +1,8 @@ +#include <iostream> + +int main() +{ + std::cout << "hello, world!" << std::endl; + return 0; +} + diff --git a/tests/runner.py b/tests/runner.py index 74868844..3cd0e2b9 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -6017,10 +6017,11 @@ elif 'sanity' in str(sys.argv): try_delete('a.out.js') # Building a file that *does* need dlmalloc *should* trigger cache generation, but only the first time - for filename, libname in [('hello_malloc.cpp', 'dlmalloc')]: + for filename, libname, otherlibname in [('hello_malloc.cpp', 'dlmalloc', 'libcxx'), ('hello_libcxx.cpp', 'libcxx', 'dlmalloc')]: for i in range(3): output = self.do([EMCC, path_from_root('tests', filename)]) assert INCLUDING_MESSAGE.replace('X', libname) in output + assert INCLUDING_MESSAGE.replace('X', otherlibname) not in output assert (BUILDING_MESSAGE.replace('X', libname) in output) == (i == 0), 'Must only build the first time' self.assertContained('hello, world!', run_js('a.out.js')) assert os.path.exists(EMCC_CACHE) |