mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
Add return value and negative checks to MapVector::erase from r219240.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5f3c0bafeb
commit
502b4d1e96
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user