summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/MapVectorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ADT/MapVectorTest.cpp')
-rw-r--r--llvm/unittests/ADT/MapVectorTest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/unittests/ADT/MapVectorTest.cpp b/llvm/unittests/ADT/MapVectorTest.cpp
index 0580580977e..46cd36acea9 100644
--- a/llvm/unittests/ADT/MapVectorTest.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud