diff options
| author | Brian Anderson <[email protected]> | 2011-04-14 19:40:35 -0400 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-04-16 18:01:17 -0400 |
| commit | 07e820089feb202bd3b3a4606bc71773760c93d2 (patch) | |
| tree | 62c77f2a1e0b7b1a6a26d23e60df664bfa59d71a /src/test/run-pass | |
| parent | rustc: Capture type parameters into for-each blocks. Add a test case. (diff) | |
| download | rust-07e820089feb202bd3b3a4606bc71773760c93d2.tar.xz rust-07e820089feb202bd3b3a4606bc71773760c93d2.zip | |
More tests for #fmt
Diffstat (limited to 'src/test/run-pass')
| -rw-r--r-- | src/test/run-pass/syntax-extension-fmt.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/run-pass/syntax-extension-fmt.rs b/src/test/run-pass/syntax-extension-fmt.rs index fcb0df18..86ac9bdc 100644 --- a/src/test/run-pass/syntax-extension-fmt.rs +++ b/src/test/run-pass/syntax-extension-fmt.rs @@ -25,4 +25,11 @@ fn main() { test(#fmt("%x", 0xff_u), "ff"); test(#fmt("%X", 0x12ab_u), "12AB"); test(#fmt("%t", 0b11010101_u), "11010101"); + + // 32-bit limits + test(#fmt("%i", -2147483648), "-2147483648"); + test(#fmt("%i", 2147483647), "2147483647"); + test(#fmt("%u", 4294967295u), "4294967295"); + test(#fmt("%x", 0xffffffff_u), "ffffffff"); + test(#fmt("%t", 0xffffffff_u), "11111111111111111111111111111111"); } |