@@ -203,12 +203,30 @@ TEST_F(Allocate, EmptyNonrealloc) {
203203 EXPECT_EQ (memory.capacity (), 42 );
204204}
205205
206- TEST_F (Allocate, EmptyRealloc ) {
206+ TEST_F (Allocate, EmptyReallocDefault ) {
207207 linear_memory_resource<ReallocNullAllocator> memory;
208208 EXPECT_EQ (memory.size (), 0 );
209209 EXPECT_EQ (memory.capacity (), 0 );
210210}
211211
212+ TEST_F (Allocate, EmptyRealloc) {
213+ linear_memory_resource<ReallocNullMemoryResource> memory{ReallocNullMemoryResource ()};
214+ EXPECT_EQ (memory.size (), 0 );
215+ EXPECT_EQ (memory.capacity (), 0 );
216+ }
217+
218+ TEST_F (Allocate, ZeroInitialRealloc) {
219+ linear_memory_resource<ReallocNullAllocator> memory{0 , ReallocNullAllocator ()};
220+ EXPECT_EQ (memory.size (), 0 );
221+ EXPECT_EQ (memory.capacity (), 0 );
222+ }
223+
224+ TEST_F (Allocate, ZeroInitialReallocMemoryResource) {
225+ linear_memory_resource<ReallocNullMemoryResource> memory{0 , ReallocNullMemoryResource ()};
226+ EXPECT_EQ (memory.size (), 0 );
227+ EXPECT_EQ (memory.capacity (), 0 );
228+ }
229+
212230TEST_F (Allocate, Truncate) {
213231 linear_memory_resource<ReallocNullAllocator> memory;
214232 std::ignore = memory.allocate (1 , 1 );
0 commit comments