diff options
| author | Piotr Czarnecki <pioczarn@gmail.com> | 2014-08-25 14:31:42 +0100 |
|---|---|---|
| committer | Piotr Czarnecki <pioczarn@gmail.com> | 2014-09-09 20:34:41 +0100 |
| commit | fcf88b8f87597f97112f048eaa296b3127e51d0b (patch) | |
| tree | 16c2ff5f07f725feda0924d14ba9cdd61352b985 | |
| parent | 5aaa60693222c98c92fbde830f9a85c24f2e3f4f (diff) | |
| download | rust-fcf88b8f87597f97112f048eaa296b3127e51d0b.tar.gz rust-fcf88b8f87597f97112f048eaa296b3127e51d0b.zip | |
coretest: Ensure that pointer formatting flags are cleaned up
| -rw-r--r-- | src/libcoretest/fmt/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libcoretest/fmt/mod.rs b/src/libcoretest/fmt/mod.rs index 9fc09b3124e..3f2208e6c2d 100644 --- a/src/libcoretest/fmt/mod.rs +++ b/src/libcoretest/fmt/mod.rs @@ -9,3 +9,10 @@ // except according to those terms. mod num; + +#[test] +fn test_format_flags() { + // No residual flags left by pointer formatting + let p = "".as_ptr(); + assert_eq!(format!("{:p} {:x}", p, 16u), format!("{:p} 10", p)); +} |
