mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 15:16:47 +02:00
Add an insert overload function (#1110)
This commit is contained in:
@@ -417,8 +417,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, arrayInsertAtRandomIndex) {
|
||||
}
|
||||
vec.push_back(&array[4]);
|
||||
// insert rvalue at the tail
|
||||
Json::Value index5("index5");
|
||||
JSONTEST_ASSERT(array.insert(5, std::move(index5)));
|
||||
JSONTEST_ASSERT(array.insert(5, "index5"));
|
||||
JSONTEST_ASSERT_EQUAL(Json::Value("index3"), array[0]);
|
||||
JSONTEST_ASSERT_EQUAL(Json::Value("index0"), array[1]);
|
||||
JSONTEST_ASSERT_EQUAL(Json::Value("index4"), array[2]);
|
||||
|
Reference in New Issue
Block a user