From b0f8bb17b8695698541f241a37e9b43cdd441206 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 1 Nov 2015 11:34:16 -0800 Subject: support .cpp files in check --- check.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'check.py') 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()) -- cgit v1.2.3