Skip to content

Commit

Permalink
Extend reallocate test for all Allocators
Browse files Browse the repository at this point in the history
  • Loading branch information
wilzbach committed Aug 3, 2016
1 parent 69c00bc commit d331a5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions std/experimental/allocator/common.d
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ Forwards each of the methods in `funs` (if defined) to `member`.
return result;
}

version(unittest)
package void testAllocator(alias make)()
{
import std.conv : text;
Expand Down Expand Up @@ -492,6 +493,8 @@ package void testAllocator(alias make)()
assert(b6.length == 0);
assert(a.reallocate(b6, 1));
assert(b6.length == 1, text(b6.length));
assert(a.reallocate(b6, 2));
assert(b6.length == 2);

// Test owns
static if (hasMember!(A, "owns"))
Expand Down

0 comments on commit d331a5d

Please sign in to comment.