From 18d07093a0218352ef533e5d3a6881de8907779f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 16 Nov 2013 21:11:42 -0800 Subject: [PATCH] Test that "#X" adds prefix "0X" (issue https://github.com/vitaut/format/issues/5) --- format_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/format_test.cc b/format_test.cc index 262c73ea..be510da7 100644 --- a/format_test.cc +++ b/format_test.cc @@ -686,6 +686,7 @@ TEST(FormatterTest, HashFlag) { EXPECT_EQ("42", str(Format("{0:#}") << 42)); EXPECT_EQ("-42", str(Format("{0:#}") << -42)); EXPECT_EQ("0x42", str(Format("{0:#x}") << 0x42)); + EXPECT_EQ("0X42", str(Format("{0:#X}") << 0x42)); EXPECT_EQ("-0x42", str(Format("{0:#x}") << -0x42)); EXPECT_EQ("042", str(Format("{0:#o}") << 042)); EXPECT_EQ("-042", str(Format("{0:#o}") << -042));