aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/hello_libcxx.cpp8
-rw-r--r--tests/runner.py3
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)