diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-03-09 06:22:58 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-03-09 06:22:58 +0000 |
commit | 259a5a649f195caf58287473c47a49029e601031 (patch) | |
tree | 229a8f13cca3dec8fe2108ab8ee36b7221982c5b /llvm/unittests/ADT/SmallStringTest.cpp | |
parent | d028adf7bc92c0595167bf41269ccded4e2f2823 (diff) | |
download | llvm-259a5a649f195caf58287473c47a49029e601031.zip llvm-259a5a649f195caf58287473c47a49029e601031.tar.gz llvm-259a5a649f195caf58287473c47a49029e601031.tar.bz2 |
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.
llvm-svn: 203375
Diffstat (limited to 'llvm/unittests/ADT/SmallStringTest.cpp')
-rw-r--r-- | llvm/unittests/ADT/SmallStringTest.cpp | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/llvm/unittests/ADT/SmallStringTest.cpp b/llvm/unittests/ADT/SmallStringTest.cpp index ff04f5b..9398e99 100644 --- a/llvm/unittests/ADT/SmallStringTest.cpp +++ b/llvm/unittests/ADT/SmallStringTest.cpp @@ -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()); |