projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f3c0ba
)
Add return value and negative checks to MapVector::erase from r219240.
author
Kaelyn Takata
<rikka@google.com>
Tue, 7 Oct 2014 23:11:49 +0000
(23:11 +0000)
committer
Kaelyn Takata
<rikka@google.com>
Tue, 7 Oct 2014 23:11:49 +0000
(23:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219250
91177308
-0d34-0410-b5e6-
96231b3b80d8
unittests/ADT/MapVectorTest.cpp
patch
|
blob
|
history
diff --git
a/unittests/ADT/MapVectorTest.cpp
b/unittests/ADT/MapVectorTest.cpp
index 0580580977e6ae95d0abebd18eaba689e04fb08c..46cd36acea96b391fc7b71296c67478950120e7f 100644
(file)
--- a/
unittests/ADT/MapVectorTest.cpp
+++ b/
unittests/ADT/MapVectorTest.cpp
@@
-68,10
+68,13
@@
TEST(MapVectorTest, erase) {
ASSERT_EQ(MV[3], 4);
ASSERT_EQ(MV[5], 6);
-
MV.erase(3
);
+
ASSERT_EQ(MV.erase(3), 1u
);
ASSERT_EQ(MV.size(), 1u);
ASSERT_EQ(MV.find(3), MV.end());
ASSERT_EQ(MV[5], 6);
+
+ ASSERT_EQ(MV.erase(79), 0u);
+ ASSERT_EQ(MV.size(), 1u);
}
TEST(MapVectorTest, remove_if) {