xo-alloc2: + utest harness for catch2

accept additional commandline arguments
This commit is contained in:
Roland Conybeare 2026-05-19 08:27:10 -04:00
commit 908c4908c5
13 changed files with 241 additions and 9 deletions

24
utest/TestUtil.cpp Normal file
View file

@ -0,0 +1,24 @@
/** @file TestUtil.cpp
*
* @author Roland Conybeare, May 2026
**/
#include "TestUtil.hpp"
#include <catch2/catch.hpp>
namespace xo {
UtestConfig *
UtestConfig::instance() {
static UtestConfig s_instance;
return &s_instance;
};
scope
Utest::ut_scope() {
return scope(XO_DEBUG(UtestConfig::instance()->debug_flag()),
xtag("name", Catch::getResultCapture().getCurrentTestName()));
}
}
/* end TestUtil.cpp */