Funnel most calls to getCurrentRunContext() through C_A_T_C_H_Context()

This commit is contained in:
Phil Nash
2015-11-23 18:43:16 +00:00
parent f4ba8aaf19
commit ebb4677089
14 changed files with 69 additions and 76 deletions

View File

@@ -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;