clang-format
This commit is contained in:
parent
41192d922e
commit
58519548e6
@ -913,7 +913,7 @@ void Value::resize(ArrayIndex newSize) {
|
||||
clear();
|
||||
else if (newSize > oldSize)
|
||||
for (ArrayIndex i = oldSize; i < newSize; ++i)
|
||||
(*this)[i];
|
||||
(*this)[i];
|
||||
else {
|
||||
for (ArrayIndex index = newSize; index < oldSize; ++index) {
|
||||
value_.map_->erase(index);
|
||||
|
@ -351,13 +351,13 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, resizeArray) {
|
||||
}
|
||||
|
||||
JSONTEST_FIXTURE_LOCAL(ValueTest, resizePopulatesAllMissingElements) {
|
||||
int n = 10;
|
||||
Json::Value v;
|
||||
v.resize(n);
|
||||
JSONTEST_ASSERT_EQUAL(n, v.size());
|
||||
JSONTEST_ASSERT_EQUAL(n, std::distance(v.begin(), v.end()));
|
||||
for (const Json::Value& e : v)
|
||||
JSONTEST_ASSERT_EQUAL(e, Json::Value{});
|
||||
int n = 10;
|
||||
Json::Value v;
|
||||
v.resize(n);
|
||||
JSONTEST_ASSERT_EQUAL(n, v.size());
|
||||
JSONTEST_ASSERT_EQUAL(n, std::distance(v.begin(), v.end()));
|
||||
for (const Json::Value& e : v)
|
||||
JSONTEST_ASSERT_EQUAL(e, Json::Value{});
|
||||
}
|
||||
|
||||
JSONTEST_FIXTURE_LOCAL(ValueTest, getArrayValue) {
|
||||
|
Loading…
Reference in New Issue
Block a user