Revert "Clean up SmallString a bit"

This reverts commit r203374.

Ambiguities in assign... oh well. I'm just going to revert this and
probably not try to recommit it as it's not terribly important.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-03-09 06:22:58 +00:00
parent ed8ba2e58e
commit 3e07f8a03d
5 changed files with 49 additions and 49 deletions

View File

@ -50,6 +50,13 @@ TEST_F(SmallStringTest, AssignRepeated) {
EXPECT_STREQ("aaa", theString.c_str());
}
TEST_F(SmallStringTest, AssignIterPair) {
StringRef abc = "abc";
theString.assign(abc.begin(), abc.end());
EXPECT_EQ(3u, theString.size());
EXPECT_STREQ("abc", theString.c_str());
}
TEST_F(SmallStringTest, AssignStringRef) {
StringRef abc = "abc";
theString.assign(abc);
@ -81,23 +88,6 @@ TEST_F(SmallStringTest, AppendStringRef) {
EXPECT_STREQ("abcabc", theString.c_str());
}
TEST_F(SmallStringTest, PlusEqualsStringRef) {
StringRef abc = "abc";
theString += abc;
theString += abc;
EXPECT_EQ(6u, theString.size());
EXPECT_STREQ("abcabc", theString.c_str());
}
TEST_F(SmallStringTest, PlusEqualsSmallVector) {
StringRef abc = "abc";
SmallVector<char, 10> abcVec(abc.begin(), abc.end());
theString += abcVec;
theString += abcVec;
EXPECT_EQ(6u, theString.size());
EXPECT_STREQ("abcabc", theString.c_str());
}
TEST_F(SmallStringTest, AppendSmallVector) {
StringRef abc = "abc";
SmallVector<char, 10> abcVec(abc.begin(), abc.end());