projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
InsertBefore is the same as AddBefore. Delete it.
[oota-llvm.git]
/
unittests
/
ADT
/
TwineTest.cpp
diff --git
a/unittests/ADT/TwineTest.cpp
b/unittests/ADT/TwineTest.cpp
index 57f54cb0060f57199c8967e73c3c310774d7039e..39d3b561b66897684a5a5e64353a4475806b0537 100644
(file)
--- a/
unittests/ADT/TwineTest.cpp
+++ b/
unittests/ADT/TwineTest.cpp
@@
-7,10
+7,10
@@
//
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
-#include "gtest/gtest.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
+#include "gtest/gtest.h"
using namespace llvm;
namespace {
using namespace llvm;
namespace {
@@
-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(-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("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.
TEST(TwineTest, Concat) {
// Check verse repr, since we care about the actual representation not just
// the result.