diff options
author | Derek Mauro <dmauro@google.com> | 2022-08-31 13:44:00 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-08-31 13:44:42 -0700 |
commit | 43d3c7a4e290ee96684735daf7b1d528c30a7943 (patch) | |
tree | ba10e3e2dcb71ff4a5bd6cc3e51c39efac377fe2 /absl/container/inlined_vector_test.cc | |
parent | 6a262fdaddb6cd7df7ddc8472a1cc61cc64a01db (diff) |
InlinedVector: Correct the computation of max_size()
Corrects the computation of max_size(), so that it accounts for the
size of the objects.
PiperOrigin-RevId: 471343778
Change-Id: I68e222cefaa0295b8d8c38d00308a29df4165e81
Diffstat (limited to 'absl/container/inlined_vector_test.cc')
-rw-r--r-- | absl/container/inlined_vector_test.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/absl/container/inlined_vector_test.cc b/absl/container/inlined_vector_test.cc index 4c1ba04a..0e528113 100644 --- a/absl/container/inlined_vector_test.cc +++ b/absl/container/inlined_vector_test.cc @@ -255,6 +255,7 @@ TEST(IntVec, Hardened) { #if !defined(NDEBUG) || ABSL_OPTION_HARDENED EXPECT_DEATH_IF_SUPPORTED(v[10], ""); EXPECT_DEATH_IF_SUPPORTED(v[-1], ""); + EXPECT_DEATH_IF_SUPPORTED(v.resize(v.max_size() + 1), ""); #endif } |