summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-06 22:51:43 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:51 +0200
commitdbb2682ebe10a8a2ed86d8ec20c24b4ef117d60d (patch)
tree176c0e4ecf6f3fc3f47d60a723f70ac8be83f379 /tests/test_core.py
parentc9bf465d5a56efd7a14cd8ad01acccca77527aad (diff)
Use do_run_from_file() for test_fcvt
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py18
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 580c5c8f..b524ff70 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -830,25 +830,13 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
self.do_run_from_file(src, output)
- # This example borrowed from MSDN documentation
def test_fcvt(self):
if self.emcc_args is None: return self.skip('requires emcc')
- src = '''
- #include <stdlib.h>
- #include <stdio.h>
-
- int main() {
- int decimal, sign;
- char *buffer;
- double source = 3.1415926535;
+ test_path = path_from_root('tests', 'core', 'test_fcvt')
+ src, output = (test_path + s for s in ('.in', '.out'))
- buffer = fcvt(source, 7, &decimal, &sign);
- printf("source: %2.10f buffer: '%s' decimal: %d sign: %d\\n",
- source, buffer, decimal, sign);
- }
- '''
- self.do_run(src, "source: 3.1415926535 buffer: '31415927' decimal: 1 sign: 0");
+ self.do_run_from_file(src, output)
def test_llrint(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('requires ta2')