Danny Robson
f6056153e3
This places, at long last, the core library code into the same namespace as the extended library code.
20 lines
475 B
C++
20 lines
475 B
C++
#include "alloc/forwarding.hpp"
|
|
#include "alloc/raw/linear.hpp"
|
|
|
|
#include "tap.hpp"
|
|
|
|
|
|
int
|
|
main ()
|
|
{
|
|
std::byte buffer[64];
|
|
cruft::alloc::raw::linear linear (buffer);
|
|
cruft::alloc::forwarding forwarding (linear);
|
|
|
|
cruft::TAP::logger tap;
|
|
tap.expect_eq (linear.used (), 0u, "construction does not allocate");
|
|
forwarding.allocate<uint8_t> (16u);
|
|
tap.expect_eq (linear.used (), 16u, "allocation size is exactly committed");
|
|
|
|
return tap.status ();
|
|
} |