diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-03-18 11:35:47 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-03-18 11:35:47 -0700 |
commit | e5f5b242e38ae6091e005144af9cf8e6ef866072 (patch) | |
tree | 421bf4da1ec5c2d3cec95c5a393abe2654744ddb /tests | |
parent | f44831c898cadb9c75b10670a82c22fbb2c328d4 (diff) |
fix printing of %llx very small and very large values
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index a5eb7ede..b93300d5 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -5254,6 +5254,8 @@ at function.:blag self.do_run(src, re.sub('(^|\n)\s+', '\\1', expected)) def test_vsnprintf(self): + if self.emcc_args is None: return self.skip('needs i64 math') + src = r''' #include <stdio.h> #include <stdarg.h> @@ -5279,6 +5281,17 @@ at function.:blag printy("0x%llx_0x%llx", y, x); printy("0x%llx_0x%llx", y, y); + { + uint64_t A = 0x800000; + uint64_t B = 0x800000000000ULL; + printy("0x%llx_0x%llx", A, B); + } + { + uint64_t A = 0x800; + uint64_t B = 0x12340000000000ULL; + printy("0x%llx_0x%llx", A, B); + } + return 0; } ''' @@ -5286,6 +5299,8 @@ at function.:blag 0x0_0x0 0x400000_0x0 0x400000_0x400000 +0x800000_0x800000000000 +0x800_0x12340000000000 ''') def test_printf_more(self): |