Converted all new part tracking tests/ sections to non variadic form

This commit is contained in:
Phil Nash 2015-11-02 06:16:09 +00:00
parent b8515929b8
commit 0b523db6b9

View File

@ -36,7 +36,7 @@ using namespace Catch;
// REQUIRE( C_A_T_C_H_Context().i() == 42 ); // REQUIRE( C_A_T_C_H_Context().i() == 42 );
//} //}
TEST_CASE( "Tracker" ) { TEST_CASE( "Tracker", "" ) {
TrackerContext ctx; TrackerContext ctx;
ctx.startRun(); ctx.startRun();
@ -48,7 +48,7 @@ TEST_CASE( "Tracker" ) {
ITracker& s1 = SectionTracker::acquire( ctx, "S1" ); ITracker& s1 = SectionTracker::acquire( ctx, "S1" );
REQUIRE( s1.isOpen() ); REQUIRE( s1.isOpen() );
SECTION( "successfully close one section" ) { SECTION( "successfully close one section", "" ) {
s1.close(); s1.close();
REQUIRE( s1.isSuccessfullyCompleted() ); REQUIRE( s1.isSuccessfullyCompleted() );
REQUIRE( testCase.isComplete() == false ); REQUIRE( testCase.isComplete() == false );
@ -58,7 +58,7 @@ TEST_CASE( "Tracker" ) {
REQUIRE( testCase.isSuccessfullyCompleted() ); REQUIRE( testCase.isSuccessfullyCompleted() );
} }
SECTION( "fail one section" ) { SECTION( "fail one section", "" ) {
s1.fail(); s1.fail();
REQUIRE( s1.isComplete() ); REQUIRE( s1.isComplete() );
REQUIRE( s1.isSuccessfullyCompleted() == false ); REQUIRE( s1.isSuccessfullyCompleted() == false );
@ -68,7 +68,7 @@ TEST_CASE( "Tracker" ) {
REQUIRE( ctx.completedCycle() ); REQUIRE( ctx.completedCycle() );
REQUIRE( testCase.isSuccessfullyCompleted() == false ); REQUIRE( testCase.isSuccessfullyCompleted() == false );
SECTION( "re-enter after failed section" ) { SECTION( "re-enter after failed section", "" ) {
ctx.startCycle(); ctx.startCycle();
ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" );
REQUIRE( testCase2.isOpen() ); REQUIRE( testCase2.isOpen() );
@ -81,7 +81,7 @@ TEST_CASE( "Tracker" ) {
REQUIRE( testCase.isComplete() ); REQUIRE( testCase.isComplete() );
REQUIRE( testCase.isSuccessfullyCompleted() ); REQUIRE( testCase.isSuccessfullyCompleted() );
} }
SECTION( "re-enter after failed section and find next section" ) { SECTION( "re-enter after failed section and find next section", "" ) {
ctx.startCycle(); ctx.startCycle();
ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" );
REQUIRE( testCase2.isOpen() ); REQUIRE( testCase2.isOpen() );
@ -101,7 +101,7 @@ TEST_CASE( "Tracker" ) {
} }
} }
SECTION( "successfully close one section, then find another" ) { SECTION( "successfully close one section, then find another", "" ) {
s1.close(); s1.close();
ITracker& s2 = SectionTracker::acquire( ctx, "S2" ); ITracker& s2 = SectionTracker::acquire( ctx, "S2" );
@ -110,7 +110,7 @@ TEST_CASE( "Tracker" ) {
testCase.close(); testCase.close();
REQUIRE( testCase.isComplete() == false ); REQUIRE( testCase.isComplete() == false );
SECTION( "Re-enter - skips S1 and enters S2" ) { SECTION( "Re-enter - skips S1 and enters S2", "" ) {
ctx.startCycle(); ctx.startCycle();
ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" );
REQUIRE( testCase2.isOpen() ); REQUIRE( testCase2.isOpen() );
@ -160,7 +160,7 @@ TEST_CASE( "Tracker" ) {
} }
} }
SECTION( "open a nested section" ) { SECTION( "open a nested section", "" ) {
ITracker& s2 = SectionTracker::acquire( ctx, "S2" ); ITracker& s2 = SectionTracker::acquire( ctx, "S2" );
REQUIRE( s2.isOpen() ); REQUIRE( s2.isOpen() );
@ -176,7 +176,7 @@ TEST_CASE( "Tracker" ) {
REQUIRE( testCase.isComplete() ); REQUIRE( testCase.isComplete() );
} }
SECTION( "start a generator" ) { SECTION( "start a generator", "" ) {
IndexTracker& g1 = IndexTracker::acquire( ctx, "G1", 2 ); IndexTracker& g1 = IndexTracker::acquire( ctx, "G1", 2 );
REQUIRE( g1.isOpen() ); REQUIRE( g1.isOpen() );
REQUIRE( g1.index() == 0 ); REQUIRE( g1.index() == 0 );
@ -191,7 +191,7 @@ TEST_CASE( "Tracker" ) {
testCase.close(); testCase.close();
REQUIRE( testCase.isSuccessfullyCompleted() == false ); REQUIRE( testCase.isSuccessfullyCompleted() == false );
SECTION( "Re-enter for second generation" ) { SECTION( "Re-enter for second generation", "" ) {
ctx.startCycle(); ctx.startCycle();
ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" );
REQUIRE( testCase2.isOpen() ); REQUIRE( testCase2.isOpen() );
@ -213,7 +213,7 @@ TEST_CASE( "Tracker" ) {
REQUIRE( testCase2.isComplete() ); REQUIRE( testCase2.isComplete() );
} }
} }
SECTION( "Start a new inner section" ) { SECTION( "Start a new inner section", "" ) {
ITracker& s2 = SectionTracker::acquire( ctx, "S2" ); ITracker& s2 = SectionTracker::acquire( ctx, "S2" );
REQUIRE( s2.isOpen() ); REQUIRE( s2.isOpen() );
@ -226,7 +226,7 @@ TEST_CASE( "Tracker" ) {
testCase.close(); testCase.close();
REQUIRE( testCase.isComplete() == false ); REQUIRE( testCase.isComplete() == false );
SECTION( "Re-enter for second generation" ) { SECTION( "Re-enter for second generation", "" ) {
ctx.startCycle(); ctx.startCycle();
ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" );
REQUIRE( testCase2.isOpen() ); REQUIRE( testCase2.isOpen() );
@ -255,7 +255,7 @@ TEST_CASE( "Tracker" ) {
} }
} }
SECTION( "Fail an inner section" ) { SECTION( "Fail an inner section", "" ) {
ITracker& s2 = SectionTracker::acquire( ctx, "S2" ); ITracker& s2 = SectionTracker::acquire( ctx, "S2" );
REQUIRE( s2.isOpen() ); REQUIRE( s2.isOpen() );
@ -269,7 +269,7 @@ TEST_CASE( "Tracker" ) {
testCase.close(); testCase.close();
REQUIRE( testCase.isComplete() == false ); REQUIRE( testCase.isComplete() == false );
SECTION( "Re-enter for second generation" ) { SECTION( "Re-enter for second generation", "" ) {
ctx.startCycle(); ctx.startCycle();
ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" );
REQUIRE( testCase2.isOpen() ); REQUIRE( testCase2.isOpen() );