coretest: Ensure that pointer formatting flags are cleaned up

This commit is contained in:
Piotr Czarnecki 2014-08-25 14:31:42 +01:00
parent 5aaa606932
commit fcf88b8f87

View File

@ -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));
}