|
@@ -136,6 +136,12 @@ static void testRemove() {
|
|
|
CORE_TEST_EQUAL(2, list[0]);
|
|
|
CORE_TEST_EQUAL(3, list[1]);
|
|
|
CORE_TEST_EQUAL(2, list.getLength());
|
|
|
+ CORE_TEST_EQUAL(Core::Error::INVALID_INDEX, list.removeBySwap(4));
|
|
|
+ CORE_TEST_EQUAL(Core::Error::INVALID_INDEX, list.removeBySwap(-1));
|
|
|
+ CORE_TEST_EQUAL(Core::Error::INVALID_INDEX, list.removeBySwap(-5));
|
|
|
+ CORE_TEST_EQUAL(2, list[0]);
|
|
|
+ CORE_TEST_EQUAL(3, list[1]);
|
|
|
+ CORE_TEST_EQUAL(2, list.getLength());
|
|
|
CORE_TEST_ERROR(list.removeBySwap(1));
|
|
|
CORE_TEST_EQUAL(2, list[0]);
|
|
|
CORE_TEST_EQUAL(1, list.getLength());
|