mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-15 09:55:39 +02:00
Funnel most calls to getCurrentRunContext() through C_A_T_C_H_Context()
This commit is contained in:
@@ -9,33 +9,10 @@
|
||||
#include "internal/catch_test_case_tracker.hpp"
|
||||
|
||||
|
||||
namespace Catch
|
||||
{
|
||||
class LocalContext {
|
||||
|
||||
public:
|
||||
TrackerContext& operator()() const {
|
||||
return TrackerContext::instance();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Catch
|
||||
|
||||
inline Catch::TrackerContext& C_A_T_C_H_Context() {
|
||||
return Catch::TrackerContext::instance();
|
||||
}
|
||||
|
||||
// -------------------
|
||||
|
||||
#include "catch.hpp"
|
||||
|
||||
using namespace Catch;
|
||||
|
||||
//inline void testCase( Catch::LocalContext const& C_A_T_C_H_Context ) {
|
||||
//
|
||||
// REQUIRE( C_A_T_C_H_Context().i() == 42 );
|
||||
//}
|
||||
|
||||
TEST_CASE( "Tracker", "" ) {
|
||||
|
||||
TrackerContext ctx;
|
||||
|
Reference in New Issue
Block a user