2016-02-10 14:05:09 +11:00
|
|
|
#include "tap.hpp"
|
2017-08-29 16:53:11 +10:00
|
|
|
#include "alloc/raw/dynamic.hpp"
|
|
|
|
#include "alloc/raw/null.hpp"
|
|
|
|
|
2016-02-10 14:05:09 +11:00
|
|
|
|
2017-08-29 16:53:11 +10:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2016-02-10 14:05:09 +11:00
|
|
|
int
|
|
|
|
main (void)
|
|
|
|
{
|
|
|
|
util::TAP::logger tap;
|
|
|
|
|
2017-08-29 16:53:11 +10:00
|
|
|
auto obj = util::alloc::raw::dynamic::make<util::alloc::raw::null> ();
|
2016-02-10 14:05:09 +11:00
|
|
|
|
|
|
|
tap.expect_throw<std::bad_alloc> (
|
|
|
|
[&] (void) {
|
|
|
|
obj.allocate (sizeof (char));
|
|
|
|
},
|
|
|
|
"trivial dispatch to null allocator"
|
|
|
|
);
|
|
|
|
|
|
|
|
return tap.status ();
|
|
|
|
}
|