mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-28 07:29:25 +00:00
Big assertion capture refactoring.
- moved as much logic out of the macros as possible - moved most logic into new ResultBuilder class, which wraps ExpressionResultBuilder (may take it over next), subsumes ResultAction and also takes place of ExpressionDecomposer. This introduces many SRP violations - but all in the name of minimising macro logic!
This commit is contained in:
parent
14796814b8
commit
9438a03d5b
26 changed files with 312 additions and 260 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "catch.hpp"
|
||||
|
||||
TEST_CASE( "section tracking" ) {
|
||||
TEST_CASE( "section tracking", "" ) {
|
||||
|
||||
using namespace Catch;
|
||||
TestCaseTracker testCaseTracker( "test case" );
|
||||
|
@ -24,7 +24,7 @@ TEST_CASE( "section tracking" ) {
|
|||
|
||||
CHECK_FALSE( testCaseTracker.isCompleted() );
|
||||
|
||||
SECTION( "test case with no sections" ) {
|
||||
SECTION( "test case with no sections", "" ) {
|
||||
|
||||
{
|
||||
TestCaseTracker::Guard guard( testCaseTracker );
|
||||
|
@ -33,7 +33,7 @@ TEST_CASE( "section tracking" ) {
|
|||
CHECK( testCaseTracker.isCompleted() );
|
||||
}
|
||||
|
||||
SECTION( "test case with one section" ) {
|
||||
SECTION( "test case with one section", "" ) {
|
||||
|
||||
{
|
||||
TestCaseTracker::Guard guard( testCaseTracker );
|
||||
|
@ -58,7 +58,7 @@ TEST_CASE( "section tracking" ) {
|
|||
}
|
||||
}
|
||||
|
||||
SECTION( "test case with two consecutive sections" ) {
|
||||
SECTION( "test case with two consecutive sections", "" ) {
|
||||
|
||||
// Enter test case
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ TEST_CASE( "section tracking" ) {
|
|||
CHECK( testCaseTracker.isCompleted() );
|
||||
}
|
||||
|
||||
SECTION( "test case with one section within another" ) {
|
||||
SECTION( "test case with one section within another", "" ) {
|
||||
|
||||
// Enter test case again
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue