From 0a7b09fa4756226ebcad0bd39151f7575a16878e Mon Sep 17 00:00:00 2001 From: Hudd Date: Mon, 18 Jul 2022 00:06:46 +0300 Subject: [PATCH] test: fix per-file context accessors I reworked the context to not use janky friend declarations, but didn't change this part. This results in incorrect test output (checks count towards a wrong context) --- test/include/aw/test/test.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/include/aw/test/test.h b/test/include/aw/test/test.h index 1b44ea61..01d94c14 100644 --- a/test/include/aw/test/test.h +++ b/test/include/aw/test/test.h @@ -31,9 +31,7 @@ namespace test { namespace { extern context file_context; -} -namespace { class context_block { friend bool setup(); friend bool preconditions(); @@ -64,7 +62,6 @@ bool setup() { context_block::enter(stage::setup); return true; } bool preconditions() { context_block::enter(stage::preconditions); return true; } bool checks() { context_block::enter(stage::checks); return true; } bool postconditions() { context_block::enter(stage::postconditions); return true; } -} // namespace template bool check(Evaluator eval, Args&&... args) @@ -153,6 +150,7 @@ struct _catch { std::string msg() { return _msg; } std::string _msg; }; +} // namespace } // namespace test } // namespace aw