Remove obsolete IndexTracker

This commit is contained in:
Martin Hořeňovský 2019-01-27 16:04:02 +01:00
parent 61f4c7ab85
commit 64a9c02315
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
8 changed files with 5 additions and 1222 deletions

View File

@ -238,55 +238,11 @@ namespace TestCaseTracking {
m_filters.insert( m_filters.end(), ++filters.begin(), filters.end() );
}
IndexTracker::IndexTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent, int size )
: TrackerBase( nameAndLocation, ctx, parent ),
m_size( size )
{}
bool IndexTracker::isIndexTracker() const { return true; }
IndexTracker& IndexTracker::acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation, int size ) {
std::shared_ptr<IndexTracker> tracker;
ITracker& currentTracker = ctx.currentTracker();
if( ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) {
assert( childTracker );
assert( childTracker->isIndexTracker() );
tracker = std::static_pointer_cast<IndexTracker>( childTracker );
}
else {
tracker = std::make_shared<IndexTracker>( nameAndLocation, ctx, &currentTracker, size );
currentTracker.addChild( tracker );
}
if( !ctx.completedCycle() && !tracker->isComplete() ) {
if( tracker->m_runState != ExecutingChildren && tracker->m_runState != NeedsAnotherRun )
tracker->moveNext();
tracker->open();
}
return *tracker;
}
int IndexTracker::index() const { return m_index; }
void IndexTracker::moveNext() {
m_index++;
m_children.clear();
}
void IndexTracker::close() {
TrackerBase::close();
if( m_runState == CompletedSuccessfully && m_index < m_size-1 )
m_runState = Executing;
}
} // namespace TestCaseTracking
using TestCaseTracking::ITracker;
using TestCaseTracking::TrackerContext;
using TestCaseTracking::SectionTracker;
using TestCaseTracking::IndexTracker;
} // namespace Catch

View File

@ -150,28 +150,11 @@ namespace TestCaseTracking {
void addNextFilters( std::vector<std::string> const& filters );
};
class IndexTracker : public TrackerBase {
int m_size;
int m_index = -1;
public:
IndexTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent, int size );
bool isIndexTracker() const override;
void close() override;
static IndexTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation, int size );
int index() const;
void moveNext();
};
} // namespace TestCaseTracking
using TestCaseTracking::ITracker;
using TestCaseTracking::TrackerContext;
using TestCaseTracking::SectionTracker;
using TestCaseTracking::IndexTracker;
} // namespace Catch

View File

@ -1034,69 +1034,6 @@ PartTracker.tests.cpp:<line number>: passed: s1.isComplete() == false for: false
PartTracker.tests.cpp:<line number>: passed: s1.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: testCase.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: testCase.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: testCase.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s1.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1.index() == 0 for: 0 == 0
PartTracker.tests.cpp:<line number>: passed: g1.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: s1.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: s1.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: testCase.isSuccessfullyCompleted() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: testCase2.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s1b.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1b.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1b.index() == 1 for: 1 == 1
PartTracker.tests.cpp:<line number>: passed: s1.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: s1b.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: g1b.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: testCase2.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: testCase.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s1.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1.index() == 0 for: 0 == 0
PartTracker.tests.cpp:<line number>: passed: g1.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: s1.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: s2.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s2.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: s1.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: testCase.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: testCase2.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s1b.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1b.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1b.index() == 1 for: 1 == 1
PartTracker.tests.cpp:<line number>: passed: s2b.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s2b.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: g1b.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: s1b.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: testCase2.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: testCase.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s1.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1.index() == 0 for: 0 == 0
PartTracker.tests.cpp:<line number>: passed: g1.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: s1.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: s2.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s2.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: s2.isSuccessfullyCompleted() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: s1.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: testCase.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: testCase2.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s1b.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1b.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1b.index() == 0 for: 0 == 0
PartTracker.tests.cpp:<line number>: passed: s2b.isOpen() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: g1b.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: s1b.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: testCase2.isComplete() == false for: false == false
PartTracker.tests.cpp:<line number>: passed: testCase3.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s1c.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1c.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: g1c.index() == 1 for: 1 == 1
PartTracker.tests.cpp:<line number>: passed: s2c.isOpen() for: true
PartTracker.tests.cpp:<line number>: passed: s2c.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: g1c.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: s1c.isComplete() for: true
PartTracker.tests.cpp:<line number>: passed: testCase3.isComplete() for: true
Exception.tests.cpp:<line number>: failed: unexpected exception with message: '3.14'
Approx.tests.cpp:<line number>: passed: d == approx( 1.23 ) for: 1.23 == Approx( 1.23 )
Approx.tests.cpp:<line number>: passed: d == approx( 1.22 ) for: 1.23 == Approx( 1.22 )

View File

@ -1171,5 +1171,5 @@ due to unexpected exception with message:
===============================================================================
test cases: 243 | 183 passed | 56 failed | 4 failed as expected
assertions: 1325 | 1189 passed | 115 failed | 21 failed as expected
assertions: 1262 | 1126 passed | 115 failed | 21 failed as expected

View File

@ -7932,411 +7932,6 @@ PartTracker.tests.cpp:<line number>: PASSED:
with expansion:
true
-------------------------------------------------------------------------------
Tracker
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1.isOpen() )
with expansion:
true
-------------------------------------------------------------------------------
Tracker
start a generator
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1.index() == 0 )
with expansion:
0 == 0
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1.isComplete() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1.isComplete() == false )
with expansion:
false == false
-------------------------------------------------------------------------------
Tracker
start a generator
close outer section
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1.isComplete() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase.isSuccessfullyCompleted() == false )
with expansion:
false == false
-------------------------------------------------------------------------------
Tracker
start a generator
close outer section
Re-enter for second generation
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase2.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1b.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1b.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1b.index() == 1 )
with expansion:
1 == 1
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1.isComplete() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1b.isComplete() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1b.isComplete() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase2.isComplete() )
with expansion:
true
-------------------------------------------------------------------------------
Tracker
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1.isOpen() )
with expansion:
true
-------------------------------------------------------------------------------
Tracker
start a generator
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1.index() == 0 )
with expansion:
0 == 0
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1.isComplete() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1.isComplete() == false )
with expansion:
false == false
-------------------------------------------------------------------------------
Tracker
start a generator
Start a new inner section
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s2.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s2.isComplete() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1.isComplete() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase.isComplete() == false )
with expansion:
false == false
-------------------------------------------------------------------------------
Tracker
start a generator
Start a new inner section
Re-enter for second generation
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase2.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1b.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1b.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1b.index() == 1 )
with expansion:
1 == 1
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s2b.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s2b.isComplete() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1b.isComplete() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1b.isComplete() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase2.isComplete() )
with expansion:
true
-------------------------------------------------------------------------------
Tracker
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1.isOpen() )
with expansion:
true
-------------------------------------------------------------------------------
Tracker
start a generator
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1.index() == 0 )
with expansion:
0 == 0
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1.isComplete() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1.isComplete() == false )
with expansion:
false == false
-------------------------------------------------------------------------------
Tracker
start a generator
Fail an inner section
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s2.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s2.isComplete() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s2.isSuccessfullyCompleted() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1.isComplete() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase.isComplete() == false )
with expansion:
false == false
-------------------------------------------------------------------------------
Tracker
start a generator
Fail an inner section
Re-enter for second generation
-------------------------------------------------------------------------------
PartTracker.tests.cpp:<line number>
...............................................................................
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase2.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1b.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1b.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1b.index() == 0 )
with expansion:
0 == 0
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s2b.isOpen() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1b.isComplete() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1b.isComplete() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase2.isComplete() == false )
with expansion:
false == false
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase3.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1c.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1c.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1c.index() == 1 )
with expansion:
1 == 1
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s2c.isOpen() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s2c.isComplete() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( g1c.isComplete() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( s1c.isComplete() )
with expansion:
true
PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( testCase3.isComplete() )
with expansion:
true
-------------------------------------------------------------------------------
Unexpected exceptions can be translated
-------------------------------------------------------------------------------
@ -10630,5 +10225,5 @@ Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 243 | 170 passed | 69 failed | 4 failed as expected
assertions: 1339 | 1189 passed | 129 failed | 21 failed as expected
assertions: 1276 | 1126 passed | 129 failed | 21 failed as expected

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuitesloose text artifact
>
<testsuite name="<exe-name>" errors="17" failures="113" tests="1340" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<testsuite name="<exe-name>" errors="17" failures="113" tests="1277" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}"/>
<testcase classname="<exe-name>.global" name="#1005: Comparing pointer to int and long (NULL can be either on various systems)" time="{duration}"/>
<testcase classname="<exe-name>.global" name="#1027" time="{duration}"/>
@ -691,13 +691,6 @@ Exception.tests.cpp:<line number>
<testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another/Re-enter - skips S1 and enters S2/Successfully close S2" time="{duration}"/>
<testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another/Re-enter - skips S1 and enters S2/fail S2" time="{duration}"/>
<testcase classname="<exe-name>.global" name="Tracker/open a nested section" time="{duration}"/>
<testcase classname="<exe-name>.global" name="Tracker/start a generator" time="{duration}"/>
<testcase classname="<exe-name>.global" name="Tracker/start a generator/close outer section" time="{duration}"/>
<testcase classname="<exe-name>.global" name="Tracker/start a generator/close outer section/Re-enter for second generation" time="{duration}"/>
<testcase classname="<exe-name>.global" name="Tracker/start a generator/Start a new inner section" time="{duration}"/>
<testcase classname="<exe-name>.global" name="Tracker/start a generator/Start a new inner section/Re-enter for second generation" time="{duration}"/>
<testcase classname="<exe-name>.global" name="Tracker/start a generator/Fail an inner section" time="{duration}"/>
<testcase classname="<exe-name>.global" name="Tracker/start a generator/Fail an inner section/Re-enter for second generation" time="{duration}"/>
<testcase classname="<exe-name>.global" name="Unexpected exceptions can be translated" time="{duration}">
<error type="TEST_CASE">
3.14

View File

@ -9193,537 +9193,6 @@ Message from section two
</Expression>
<OverallResults successes="6" failures="0" expectedFailures="0"/>
</Section>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Section name="start a generator" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1.index() == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Section name="close outer section" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase.isSuccessfullyCompleted() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Section name="Re-enter for second generation" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase2.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1b.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1b.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1b.index() == 1
</Original>
<Expanded>
1 == 1
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1b.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1b.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase2.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<OverallResults successes="8" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="10" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="14" failures="0" expectedFailures="0"/>
</Section>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Section name="start a generator" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1.index() == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Section name="Start a new inner section" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s2.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s2.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Section name="Re-enter for second generation" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase2.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1b.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1b.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1b.index() == 1
</Original>
<Expanded>
1 == 1
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s2b.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s2b.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1b.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1b.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase2.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<OverallResults successes="9" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="13" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="17" failures="0" expectedFailures="0"/>
</Section>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Section name="start a generator" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1.index() == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Section name="Fail an inner section" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s2.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s2.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s2.isSuccessfullyCompleted() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Section name="Re-enter for second generation" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase2.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1b.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1b.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1b.index() == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s2b.isOpen() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1b.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1b.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase2.isComplete() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase3.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1c.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1c.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1c.index() == 1
</Original>
<Expanded>
1 == 1
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s2c.isOpen()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s2c.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
g1c.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
s1c.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" >
<Original>
testCase3.isComplete()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<OverallResults successes="17" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="22" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="26" failures="0" expectedFailures="0"/>
</Section>
<OverallResult success="true"/>
</TestCase>
<TestCase name="Unexpected exceptions can be translated" tags="[!throws][.][failing]" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
@ -12264,7 +11733,7 @@ loose text artifact
</Section>
<OverallResult success="true"/>
</TestCase>
<OverallResults successes="1189" failures="130" expectedFailures="21"/>
<OverallResults successes="1126" failures="130" expectedFailures="21"/>
</Group>
<OverallResults successes="1189" failures="129" expectedFailures="21"/>
<OverallResults successes="1126" failures="129" expectedFailures="21"/>
</Catch>

View File

@ -173,156 +173,6 @@ TEST_CASE( "Tracker" ) {
testCase.close();
REQUIRE( testCase.isComplete() );
}
SECTION( "start a generator" ) {
IndexTracker& g1 = IndexTracker::acquire( ctx, makeNAL( "G1" ), 2 );
REQUIRE( g1.isOpen() );
REQUIRE( g1.index() == 0 );
REQUIRE( g1.isComplete() == false );
REQUIRE( s1.isComplete() == false );
SECTION( "close outer section" )
{
s1.close();
REQUIRE( s1.isComplete() == false );
testCase.close();
REQUIRE( testCase.isSuccessfullyCompleted() == false );
SECTION( "Re-enter for second generation" ) {
ctx.startCycle();
ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) );
REQUIRE( testCase2.isOpen() );
ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) );
REQUIRE( s1b.isOpen() );
IndexTracker& g1b = IndexTracker::acquire( ctx, makeNAL( "G1" ), 2 );
REQUIRE( g1b.isOpen() );
REQUIRE( g1b.index() == 1 );
REQUIRE( s1.isComplete() == false );
s1b.close();
REQUIRE( s1b.isComplete() );
REQUIRE( g1b.isComplete() );
testCase2.close();
REQUIRE( testCase2.isComplete() );
}
}
SECTION( "Start a new inner section" ) {
ITracker& s2 = SectionTracker::acquire( ctx, makeNAL( "S2" ) );
REQUIRE( s2.isOpen() );
s2.close();
REQUIRE( s2.isComplete() );
s1.close();
REQUIRE( s1.isComplete() == false );
testCase.close();
REQUIRE( testCase.isComplete() == false );
SECTION( "Re-enter for second generation" ) {
ctx.startCycle();
ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) );
REQUIRE( testCase2.isOpen() );
ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) );
REQUIRE( s1b.isOpen() );
// generator - next value
IndexTracker& g1b = IndexTracker::acquire( ctx, makeNAL( "G1" ), 2 );
REQUIRE( g1b.isOpen() );
REQUIRE( g1b.index() == 1 );
// inner section again
ITracker& s2b = SectionTracker::acquire( ctx, makeNAL( "S2" ) );
REQUIRE( s2b.isOpen() );
s2b.close();
REQUIRE( s2b.isComplete() );
s1b.close();
REQUIRE( g1b.isComplete() );
REQUIRE( s1b.isComplete() );
testCase2.close();
REQUIRE( testCase2.isComplete() );
}
}
SECTION( "Fail an inner section" ) {
ITracker& s2 = SectionTracker::acquire( ctx, makeNAL( "S2" ) );
REQUIRE( s2.isOpen() );
s2.fail();
REQUIRE( s2.isComplete() );
REQUIRE( s2.isSuccessfullyCompleted() == false );
s1.close();
REQUIRE( s1.isComplete() == false );
testCase.close();
REQUIRE( testCase.isComplete() == false );
SECTION( "Re-enter for second generation" ) {
ctx.startCycle();
ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) );
REQUIRE( testCase2.isOpen() );
ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) );
REQUIRE( s1b.isOpen() );
// generator - still same value
IndexTracker& g1b = IndexTracker::acquire( ctx, makeNAL( "G1" ), 2 );
REQUIRE( g1b.isOpen() );
REQUIRE( g1b.index() == 0 );
// inner section again - this time won't open
ITracker& s2b = SectionTracker::acquire( ctx, makeNAL( "S2" ) );
REQUIRE( s2b.isOpen() == false );
s1b.close();
REQUIRE( g1b.isComplete() == false );
REQUIRE( s1b.isComplete() == false );
testCase2.close();
REQUIRE( testCase2.isComplete() == false );
// Another cycle - now should complete
ctx.startCycle();
ITracker& testCase3 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) );
REQUIRE( testCase3.isOpen() );
ITracker& s1c = SectionTracker::acquire( ctx, makeNAL( "S1" ) );
REQUIRE( s1c.isOpen() );
// generator - now next value
IndexTracker& g1c = IndexTracker::acquire( ctx, makeNAL( "G1" ), 2 );
REQUIRE( g1c.isOpen() );
REQUIRE( g1c.index() == 1 );
// inner section - now should open again
ITracker& s2c = SectionTracker::acquire( ctx, makeNAL( "S2" ) );
REQUIRE( s2c.isOpen() );
s2c.close();
REQUIRE( s2c.isComplete() );
s1c.close();
REQUIRE( g1c.isComplete() );
REQUIRE( s1c.isComplete() );
testCase3.close();
REQUIRE( testCase3.isComplete() );
}
}
// !TBD"
// nested generator
// two sections within a generator
}
}
static bool previouslyRun = false;