diff options
| author | Brian Anderson <[email protected]> | 2011-04-17 18:19:26 -0400 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-04-17 18:19:26 -0400 |
| commit | 86a43c24d627131c7c543ffc2df7793939141404 (patch) | |
| tree | 33891d314a6d14457b9628455c7a3b8a868ef5b6 /src/test | |
| parent | Support #fmt precision for bools, with same rules as strings (diff) | |
| download | rust-86a43c24d627131c7c543ffc2df7793939141404.tar.xz rust-86a43c24d627131c7c543ffc2df7793939141404.zip | |
Support + flag in #fmt
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/syntax-extension-fmt.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/run-pass/syntax-extension-fmt.rs b/src/test/run-pass/syntax-extension-fmt.rs index 5c66b17a..1e283c2d 100644 --- a/src/test/run-pass/syntax-extension-fmt.rs +++ b/src/test/run-pass/syntax-extension-fmt.rs @@ -112,4 +112,9 @@ fn main() { test(#fmt("%.b", true), ""); test(#fmt("%.0b", true), ""); test(#fmt("%.1b", true), "t"); + + // Explicit + sign. Only for signed conversions + test(#fmt("%+d", 0), "+0"); + test(#fmt("%+d", 1), "+1"); + test(#fmt("%+d", -1), "-1"); } |