Debian Codegraph @

libphobos/testsuite/libphobos.phobos/std_experimental_allocator_building_blocks_scoped_allocator.d

raw
1 @system unittest
2 {
3 import std.experimental.allocator.building_blocks.scoped_allocator;
4
5 import std.experimental.allocator.mallocator : Mallocator;
6 import std.typecons : Ternary;
7 ScopedAllocator!Mallocator alloc;
8 assert(alloc.empty == Ternary.yes);
9 const b = alloc.allocate(10);
10 assert(b.length == 10);
11 assert(alloc.empty == Ternary.no);
12 }
13