From 18f67d0958b33a2f5b4de8c9a4ce65f123949d78 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 22 Feb 2024 15:28:38 -0800 Subject: [PATCH] Parameterize test_webgpu_compiletest. NFC --- test/test_other.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/test_other.py b/test/test_other.py index 59d3673ef8711..fc99e5c69283c 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -11877,9 +11877,14 @@ def test(args, expect_fail): # unless we explicitly disable polyfills test(['-sLEGACY_VM_SUPPORT', '-sNO_POLYFILL'], expect_fail=True) - def test_webgpu_compiletest(self): - for args in [[], ['-sASSERTIONS'], ['-sASSERTIONS', '--closure=1'], ['-sMAIN_MODULE=1']]: - self.run_process([EMXX, test_file('webgpu_jsvalstore.cpp'), '-sUSE_WEBGPU', '-sASYNCIFY'] + args) + @parameterized({ + '': ([],), + 'assertions': (['-sASSERTIONS'],), + 'closure': (['-sASSERTIONS', '--closure=1'],), + 'dylink': (['-sMAIN_MODULE'],), + }) + def test_webgpu_compiletest(self, args): + self.run_process([EMXX, test_file('webgpu_jsvalstore.cpp'), '-sUSE_WEBGPU', '-sASYNCIFY'] + args) def test_signature_mismatch(self): create_file('a.c', 'void foo(); int main() { foo(); return 0; }')