summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/check.py b/check.py
index 2d7c8a8d6..4fbe154d7 100755
--- a/check.py
+++ b/check.py
@@ -65,15 +65,16 @@ for asm in tests:
print '\n[ checking wasm.js polyfill testcases... (need both emcc and nodejs in your path) ]\n'
for c in tests:
- if c.endswith('.c'):
+ if c.endswith(('.c', '.cpp')):
print '..', c
- post = c.replace('.c', '.post.js')
+ base = c.replace('.cpp', '').replace('.c', '')
+ post = base + '.post.js'
try:
post = open(os.path.join('test', post)).read()
except:
post = None
- expected = open(os.path.join('test', c.replace('.c', '.txt'))).read()
- emcc = os.path.join('test', c.replace('.c', '.emcc'))
+ expected = open(os.path.join('test', base + '.txt')).read()
+ emcc = os.path.join('test', base + '.emcc')
extra = []
if os.path.exists(emcc):
extra = json.loads(open(emcc).read())