aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-27 15:26:43 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-27 15:26:43 -0800
commit9694653fd66908a6d135ccc88f44db315133c9d8 (patch)
tree4f6be664cce0ac4acbd612160c56f7cf80e39379
parent51ae20febe99a15e2ebfc1145ba29e92a0f81792 (diff)
finish precompiled headers test; fixes #2045
-rw-r--r--tests/test_other.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_other.py b/tests/test_other.py
index 74507c21..bc05826e 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -2343,3 +2343,11 @@ int main() {
output = run_js(self.in_dir('a.out.js'), stderr=PIPE, full_output=True, engine=NODE_JS)
assert '|5|' in output, output
+ # also verify that the gch is actually used
+ err = Popen([PYTHON, EMCC, 'src.cpp', '-include', 'header.h', '-Xclang', '-print-stats'], stderr=PIPE).communicate()
+ assert '*** PCH/Modules Loaded:\nModule: header.h.gch' in err[1], err[1]
+ # and sanity check it is not mentioned when not
+ try_delete('header.h.gch')
+ err = Popen([PYTHON, EMCC, 'src.cpp', '-include', 'header.h', '-Xclang', '-print-stats'], stderr=PIPE).communicate()
+ assert '*** PCH/Modules Loaded:\nModule: header.h.gch' not in err[1], err[1]
+