diff options
author | max99x <max99x@gmail.com> | 2011-08-25 16:15:30 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-08-25 16:25:16 +0300 |
commit | 0f9d296b52466fc5f3cfcd6004d3b49f07363100 (patch) | |
tree | 267c3f204f954f98ef246186259ebd1026cfca4f /tests | |
parent | 58b8fa4ff05d62b3d9a6e793bb73118c23349897 (diff) |
Fixed _formatString()/printf() for USE_TYPED_ARRAYS + test for it.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/runner.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index e8cfba42..e51f8e86 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -2245,6 +2245,25 @@ if 'benchmark' not in sys.argv: expected = open(path_from_root('tests', 'printf', 'output.txt'), 'r').read() self.do_test(src, expected) + def test_printf_types(self): + src = r''' + #include <stdio.h> + + int main() { + char c = '1'; + short s = 2; + int i = 3; + long long l = 4; + float f = 5.5; + double d = 6.6; + + printf("%c,%hd,%d,%lld,%.1f,%.1llf\n", c, s, i, l, f, d); + + return 0; + } + ''' + self.do_test(src, '1,2,3,4,5.5,6.6\n') + def test_vprintf(self): src = r''' #include <stdio.h> |