diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-20 19:51:54 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-20 19:51:54 -0800 |
commit | 909c747f4f3eb56ba4423d2848cd5b0b301067c8 (patch) | |
tree | 8feac03d19628faea312d2f41d4660cf4334c2a5 | |
parent | a1059b8098bb107191b88556b9d1b6f0e9ea69eb (diff) |
strenghen varargs function pointer test
-rwxr-xr-x | tests/runner.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/runner.py b/tests/runner.py index e3d7b76b..5af33b72 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -3466,7 +3466,6 @@ def process(filename): def test_varargs(self): if Settings.QUANTUM_SIZE == 1: return self.skip('FIXME: Add support for this') - if Settings.ASM_JS: return self.skip('varargs by function pointer not yet supported') src = ''' #include <stdio.h> @@ -3517,7 +3516,7 @@ def process(filename): GETMAX(i, int); GETMAX(D, double); - int main() { + int main(int argc, char **argv) { vary("*cheez: %d+%d*", 0, 24); // Also tests that '0' is not special as an array ender vary("*albeit*"); // Should not fail with no var args in vararg function vary2('Q', "%d*", 85); @@ -3528,7 +3527,7 @@ def process(filename): printf("maxxD:%.2f*\\n", (float)maxxD); // And, as a function pointer - void (*vfp)(const char *s, ...) = vary; + void (*vfp)(const char *s, ...) = argc == 1211 ? NULL : vary; vfp("*vfp:%d,%d*", 22, 199); return 0; |