mass elimination of reliance on automatic iterator dereferencing
[oota-llvm.git] / unittests / ADT / TwineTest.cpp
index 50fdd2ed3141f26b7e665b9e3329d27a4549a579..61e8a0ac37cbbccfe7cd1cb13103cffaef24b276 100644 (file)
@@ -30,6 +30,18 @@ TEST(TwineTest, Construction) {
   EXPECT_EQ("hi", Twine(StringRef("hithere", 2)).str());
 }
 
+TEST(TwineTest, Numbers) {
+  EXPECT_EQ("123", Twine(123U).str());
+  EXPECT_EQ("123", Twine(123).str());
+  EXPECT_EQ("-123", Twine(-123).str());
+  EXPECT_EQ("123", Twine(123).str());
+  EXPECT_EQ("-123", Twine(-123).str());
+  EXPECT_EQ("123", Twine((char) 123).str());
+  EXPECT_EQ("-123", Twine((signed char) -123).str());
+
+  EXPECT_EQ("7b", Twine::utohexstr(123).str());
+}
+
 TEST(TwineTest, Concat) {
   // Check verse repr, since we care about the actual representation not just
   // the result.