xo-alloc: UT for allocator interation + misc improvements
This commit is contained in:
parent
77f84cabbb
commit
764e98e12e
6 changed files with 295 additions and 154 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include "ArenaAlloc.hpp"
|
||||
#include "xo/reflect/Reflect.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include <regex>
|
||||
#include <cstring>
|
||||
|
||||
namespace xo {
|
||||
|
|
@ -58,7 +59,14 @@ namespace xo {
|
|||
std::stringstream ss;
|
||||
ss << fwd;
|
||||
|
||||
REQUIRE(ss.str() == "<fwd :dest-td DummyObject>");
|
||||
// forwarding printer looks like
|
||||
// "<fwd :dest 0x1ef49c20>"
|
||||
//
|
||||
|
||||
std::regex pattern(R"(<fwd :dest 0x[0-9a-f]+>)");
|
||||
REQUIRE(std::regex_match(ss.str(), pattern));
|
||||
|
||||
//REQUIRE(ss.str() == "<fwd :dest DummyObject>");
|
||||
|
||||
tag_config::tag_color_enabled = saved;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue