aboutsummaryrefslogtreecommitdiffstats
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-30 03:47:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-30 03:47:15 +0000
commit0165a2ca897598bb95baec031362921565e24f2b (patch)
treee86f0c3785829879dde86657f0639df9504ad31a /unittests
parent713395950a615b2fb932fc25a6723612ca09b23c (diff)
downloadexternal_llvm-0165a2ca897598bb95baec031362921565e24f2b.zip
external_llvm-0165a2ca897598bb95baec031362921565e24f2b.tar.gz
external_llvm-0165a2ca897598bb95baec031362921565e24f2b.tar.bz2
Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77576 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ADT/TwineTest.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/unittests/ADT/TwineTest.cpp b/unittests/ADT/TwineTest.cpp
index 2f87476..9a31901 100644
--- a/unittests/ADT/TwineTest.cpp
+++ b/unittests/ADT/TwineTest.cpp
@@ -31,12 +31,13 @@ TEST(TwineTest, Construction) {
}
TEST(TwineTest, Numbers) {
- EXPECT_EQ("123", Twine::utostr(123).str());
- EXPECT_EQ("-123", Twine::itostr(-123).str());
- EXPECT_EQ("123", Twine::utostr(123).str());
- EXPECT_EQ("-123", Twine::itostr(-123).str());
- EXPECT_EQ("123", Twine::utostr((char) 123).str());
- EXPECT_EQ("-123", Twine::itostr((signed char) -123).str());
+ 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());
EXPECT_EQ("FFFFFFFFFFFFFF85", Twine::itohexstr(-123).str());