xo-umbrella2/xo-testutil/include/xo/testutil/Utest.hpp
Roland Conybeare 5a06bced3b git subrepo clone git@github.com:rconybea/xo-testutil.git xo-testutil
subrepo:
  subdir:   "xo-testutil"
  merged:   "281418da"
upstream:
  origin:   "git@github.com:rconybea/xo-testutil.git"
  branch:   "main"
  commit:   "281418da"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2026-06-06 21:50:26 -04:00

35 lines
650 B
C++

/** @file Utest.hpp
*
* @author Roland Conybeare, May 2026
**/
#pragma once
#include <xo/indentlog/scope.hpp>
namespace xo {
/** RAII logging for catch2 unit tests
*
* Use:
* TEST_CASE(name, tags, ..)
* {
* scope log = Utest::ut_scope();
*
* ...
* log && log(xtag("foo", ...));
* }
*
* Honors:
* UtestConfig::instance()->debug_flag_
**/
struct Utest {
/** Toplevel logging scope for unit tests.
* Integrates with UtestConfig
**/
static scope ut_scope();
};
} /*namespace xo*/
/* end Utest.hpp */