Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Reinstated #include that broke single include

Commit
1787da54a7c9282a9c88bfb3eb584854e0f7ca68
Author
Phil Nash ·
Parents
7004f4a234ac

Files · Download .tar.gz

Changes

 include/catch.hpp                         | 1 +
 include/internal/catch_test_case_info.hpp | 1 +
 projects/SelfTest/MessageTests.cpp        | 9 +++++++++
 projects/SelfTest/catch_self_test.hpp     | 1 -
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/catch.hpp b/include/catch.hpp
index 714b00e1..a3e8e86e 100644
--- a/include/catch.hpp
+++ b/include/catch.hpp
@@ -8,6 +8,7 @@
 
 #ifndef TWOBLUECUBES_CATCH_HPP_INCLUDED
 #define TWOBLUECUBES_CATCH_HPP_INCLUDED
+#include "internal/catch_test_case_info.hpp" // This needs to be here to prevent the single_include script ommitting it after the obj_c header
 #include "internal/catch_context.h"
 #include "internal/catch_test_registry.hpp"
 #include "internal/catch_capture.hpp"
diff --git a/include/internal/catch_test_case_info.hpp b/include/internal/catch_test_case_info.hpp
index 77043420..bc0b8827 100644
--- a/include/internal/catch_test_case_info.hpp
+++ b/include/internal/catch_test_case_info.hpp
@@ -8,6 +8,7 @@
 #ifndef TWOBLUECUBES_CATCH_TESTCASEINFO_HPP_INCLUDED
 #define TWOBLUECUBES_CATCH_TESTCASEINFO_HPP_INCLUDED
 
+#include "catch_common.h"
 #include "catch_interfaces_testcase.h"
 #include <map>
 #include <string>
diff --git a/projects/SelfTest/MessageTests.cpp b/projects/SelfTest/MessageTests.cpp
index a6324a34..d7c148f6 100644
--- a/projects/SelfTest/MessageTests.cpp
+++ b/projects/SelfTest/MessageTests.cpp
@@ -75,3 +75,12 @@ TEST_CASE( "./succeeding/message/sections/stdout", "Output from all sections is
         std::cout << "Message from section two" << std::endl;
     }
 }
+
+TEST_CASE( "./mixed/message/scoped", "" )
+{
+    for( int i=0; i<100; i++ )
+    {
+       SCOPED_INFO( "current counter " << i );
+       REQUIRE( i < 10 );
+    }
+}
diff --git a/projects/SelfTest/catch_self_test.hpp b/projects/SelfTest/catch_self_test.hpp
index 93a0d607..41b0c9fa 100644
--- a/projects/SelfTest/catch_self_test.hpp
+++ b/projects/SelfTest/catch_self_test.hpp
@@ -9,7 +9,6 @@
 #define TWOBLUECUBES_CATCH_SELF_TEST_HPP_INCLUDED
 
 #include "catch.hpp"
-#include "catch_test_case_info.hpp"
 
 #include "set"