2
0
mirror of https://github.com/boostorg/json.git synced 2026-01-28 07:12:20 +00:00

array coverage

This commit is contained in:
Vinnie Falco
2019-11-01 11:47:30 -07:00
parent 3150db1069
commit c1ef2ab337
2 changed files with 11 additions and 1 deletions

View File

@@ -621,6 +621,16 @@ public:
a.reserve(50);
BEAST_EXPECT(a.capacity() >= 50);
}
fail_loop([&](storage_ptr const& sp)
{
array a(min_capacity_, 'c', sp);
a.reserve(a.capacity() + 1);
auto const new_cap = a.capacity();
BEAST_EXPECT(new_cap > min_capacity_);
a.reserve((min_capacity_ + new_cap) / 2);
BEAST_EXPECT(a.capacity() == new_cap);
});
}
// capacity()