Skip to content

Commit d331a5d

Browse files
committed
Extend reallocate test for all Allocators
1 parent 69c00bc commit d331a5d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

std/experimental/allocator/common.d

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ Forwards each of the methods in `funs` (if defined) to `member`.
407407
return result;
408408
}
409409

410+
version(unittest)
410411
package void testAllocator(alias make)()
411412
{
412413
import std.conv : text;
@@ -492,6 +493,8 @@ package void testAllocator(alias make)()
492493
assert(b6.length == 0);
493494
assert(a.reallocate(b6, 1));
494495
assert(b6.length == 1, text(b6.length));
496+
assert(a.reallocate(b6, 2));
497+
assert(b6.length == 2);
495498

496499
// Test owns
497500
static if (hasMember!(A, "owns"))

0 commit comments

Comments
 (0)