Test that "#X" adds prefix "0X" (issue https://github.com/vitaut/format/issues/5)

This commit is contained in:
Victor Zverovich 2013-11-16 21:11:42 -08:00
parent 93ca4c98fe
commit 18d07093a0

View File

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