diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-10-20 21:10:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-10-20 21:10:27 +0000 |
commit | 30815c536baacc07e925f0aef23a5395883173dc (patch) | |
tree | 2cbcf22585e99f8a87d12d5ff94f392c0d266819 /unittests/ADT/TwineTest.cpp | |
parent | 411bd29eea3c360d5b48a18a17b5e87f5671af0e (diff) |
Diffstat (limited to 'unittests/ADT/TwineTest.cpp')
-rw-r--r-- | unittests/ADT/TwineTest.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/unittests/ADT/TwineTest.cpp b/unittests/ADT/TwineTest.cpp index 57f54cb0060f..e9cc41d13fc0 100644 --- a/unittests/ADT/TwineTest.cpp +++ b/unittests/ADT/TwineTest.cpp @@ -37,12 +37,16 @@ TEST(TwineTest, Numbers) { 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, Characters) { + EXPECT_EQ("x", Twine('x').str()); + EXPECT_EQ("x", Twine(static_cast<unsigned char>('x')).str()); + EXPECT_EQ("x", Twine(static_cast<signed char>('x')).str()); +} + TEST(TwineTest, Concat) { // Check verse repr, since we care about the actual representation not just // the result. |