Renamed JsonArray::removeAt() into remove()

This commit is contained in:
Benoit Blanchon
2017-04-12 17:03:33 +02:00
parent 8c6f64c111
commit f2ef338cb8
6 changed files with 21 additions and 5 deletions

View File

@ -14,7 +14,7 @@ add_executable(JsonArrayTests
iterator.cpp
prettyPrintTo.cpp
printTo.cpp
removeAt.cpp
remove.cpp
set.cpp
subscript.cpp
)

View File

@ -23,7 +23,7 @@ class JsonArray_Remove_Tests : public ::testing::Test {
#define TEST_(name) TEST_F(JsonArray_Remove_Tests, name)
TEST_(RemoveFirstByIndex) {
_array.removeAt(0);
_array.remove(0);
EXPECT_EQ(2, _array.size());
EXPECT_STREQ("two", _array[0]);
@ -31,7 +31,7 @@ TEST_(RemoveFirstByIndex) {
}
TEST_(RemoveMiddleByIndex) {
_array.removeAt(1);
_array.remove(1);
EXPECT_EQ(2, _array.size());
EXPECT_STREQ("one", _array[0]);
@ -39,7 +39,7 @@ TEST_(RemoveMiddleByIndex) {
}
TEST_(RemoveLastByIndex) {
_array.removeAt(2);
_array.remove(2);
EXPECT_EQ(2, _array.size());
EXPECT_STREQ("one", _array[0]);

View File

@ -34,3 +34,9 @@ TEST(Deprecated, asString) {
JsonVariant variant = "hello";
ASSERT_STREQ("hello", variant.asString());
}
TEST(Deprecated, removeAt) {
DynamicJsonBuffer jsonBuffer;
JsonArray& arr = jsonBuffer.createArray();
arr.removeAt(0);
}