diff options
-rw-r--r-- | tests/core/test_iswdigit.in | 12 | ||||
-rw-r--r-- | tests/core/test_iswdigit.out | 1 | ||||
-rw-r--r-- | tests/test_core.py | 15 |
3 files changed, 16 insertions, 12 deletions
diff --git a/tests/core/test_iswdigit.in b/tests/core/test_iswdigit.in new file mode 100644 index 00000000..cc1b4a74 --- /dev/null +++ b/tests/core/test_iswdigit.in @@ -0,0 +1,12 @@ + + #include <stdio.h> + #include <cctype> + #include <cwctype> + + int main() { + using namespace std; + printf("%d ", isdigit('0')); + printf("%d ", iswdigit(L'0')); + return 0; + } +
\ No newline at end of file diff --git a/tests/core/test_iswdigit.out b/tests/core/test_iswdigit.out new file mode 100644 index 00000000..92880af7 --- /dev/null +++ b/tests/core/test_iswdigit.out @@ -0,0 +1 @@ +1 1
\ No newline at end of file diff --git a/tests/test_core.py b/tests/test_core.py index 1bd82d41..8b96a6d6 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1417,19 +1417,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co def test_iswdigit(self): if self.emcc_args is None: return self.skip('no libcxx inclusion without emcc') - src = ''' - #include <stdio.h> - #include <cctype> - #include <cwctype> + test_path = path_from_root('tests', 'core', 'test_iswdigit') + src, output = (test_path + s for s in ('.in', '.out')) - int main() { - using namespace std; - printf("%d ", isdigit('0')); - printf("%d ", iswdigit(L'0')); - return 0; - } - ''' - self.do_run(src, '1 1') + self.do_run_from_file(src, output) def test_polymorph(self): if self.emcc_args is None: return self.skip('requires emcc') |