Report generator states for failed assertions

This commit is contained in:
Marcel Gotsch 2022-08-27 16:40:41 +02:00
parent dc001fa935
commit 4c0a291770
16 changed files with 2718 additions and 5 deletions

View File

@ -29,7 +29,7 @@ TEST_CASE("Generate random doubles across different ranges",
// This will take r1 by reference and r2 by value. // This will take r1 by reference and r2 by value.
// Note that there are no advantages for doing so in this example, // Note that there are no advantages for doing so in this example,
// it is done only for expository purposes. // it is done only for expository purposes.
auto number = Catch::Generators::generate( "custom capture generator", CATCH_INTERNAL_LINEINFO, auto number = Catch::Generators::generate( "custom capture generator", "custom definition", CATCH_INTERNAL_LINEINFO,
[&r1, r2]{ [&r1, r2]{
using namespace Catch::Generators; using namespace Catch::Generators;
return makeGenerators(take(50, random(std::get<0>(r1), std::get<1>(r2)))); return makeGenerators(take(50, random(std::get<0>(r1), std::get<1>(r2))));

View File

@ -111,6 +111,7 @@ set(INTERNAL_HEADERS
${SOURCES_DIR}/matchers/catch_matchers_templated.hpp ${SOURCES_DIR}/matchers/catch_matchers_templated.hpp
${SOURCES_DIR}/matchers/catch_matchers_vector.hpp ${SOURCES_DIR}/matchers/catch_matchers_vector.hpp
${SOURCES_DIR}/catch_message.hpp ${SOURCES_DIR}/catch_message.hpp
${SOURCES_DIR}/internal/catch_generator_info.hpp
${SOURCES_DIR}/internal/catch_message_info.hpp ${SOURCES_DIR}/internal/catch_message_info.hpp
${SOURCES_DIR}/internal/catch_meta.hpp ${SOURCES_DIR}/internal/catch_meta.hpp
${SOURCES_DIR}/internal/catch_move_and_forward.hpp ${SOURCES_DIR}/internal/catch_move_and_forward.hpp
@ -236,6 +237,7 @@ set(IMPL_SOURCES
${SOURCES_DIR}/internal/catch_errno_guard.cpp ${SOURCES_DIR}/internal/catch_errno_guard.cpp
${SOURCES_DIR}/internal/catch_lazy_expr.cpp ${SOURCES_DIR}/internal/catch_lazy_expr.cpp
${SOURCES_DIR}/internal/catch_leak_detector.cpp ${SOURCES_DIR}/internal/catch_leak_detector.cpp
${SOURCES_DIR}/internal/catch_generator_info.cpp
${SOURCES_DIR}/internal/catch_message_info.cpp ${SOURCES_DIR}/internal/catch_message_info.cpp
${SOURCES_DIR}/internal/catch_polyfills.cpp ${SOURCES_DIR}/internal/catch_polyfills.cpp
${SOURCES_DIR}/internal/catch_startup_exception_registry.cpp ${SOURCES_DIR}/internal/catch_startup_exception_registry.cpp

View File

@ -68,6 +68,7 @@
#include <catch2/internal/catch_exception_translator_registry.hpp> #include <catch2/internal/catch_exception_translator_registry.hpp>
#include <catch2/internal/catch_fatal_condition_handler.hpp> #include <catch2/internal/catch_fatal_condition_handler.hpp>
#include <catch2/internal/catch_floating_point_helpers.hpp> #include <catch2/internal/catch_floating_point_helpers.hpp>
#include <catch2/internal/catch_generator_info.hpp>
#include <catch2/internal/catch_istream.hpp> #include <catch2/internal/catch_istream.hpp>
#include <catch2/internal/catch_lazy_expr.hpp> #include <catch2/internal/catch_lazy_expr.hpp>
#include <catch2/internal/catch_leak_detector.hpp> #include <catch2/internal/catch_leak_detector.hpp>

View File

@ -8,8 +8,10 @@
#ifndef CATCH_GENERATORS_HPP_INCLUDED #ifndef CATCH_GENERATORS_HPP_INCLUDED
#define CATCH_GENERATORS_HPP_INCLUDED #define CATCH_GENERATORS_HPP_INCLUDED
#include "catch2/interfaces/catch_interfaces_capture.hpp"
#include <catch2/catch_tostring.hpp> #include <catch2/catch_tostring.hpp>
#include <catch2/interfaces/catch_interfaces_generatortracker.hpp> #include <catch2/interfaces/catch_interfaces_generatortracker.hpp>
#include <catch2/internal/catch_generator_info.hpp>
#include <catch2/internal/catch_source_line_info.hpp> #include <catch2/internal/catch_source_line_info.hpp>
#include <catch2/internal/catch_stringref.hpp> #include <catch2/internal/catch_stringref.hpp>
#include <catch2/internal/catch_move_and_forward.hpp> #include <catch2/internal/catch_move_and_forward.hpp>
@ -210,7 +212,7 @@ namespace Detail {
// Note: The type after -> is weird, because VS2015 cannot parse // Note: The type after -> is weird, because VS2015 cannot parse
// the expression used in the typedef inside, when it is in // the expression used in the typedef inside, when it is in
// return type. Yeah. // return type. Yeah.
auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) { auto generate( StringRef generatorName, StringRef definition, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) {
using UnderlyingType = typename decltype(generatorExpression())::type; using UnderlyingType = typename decltype(generatorExpression())::type;
IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo ); IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo );
@ -219,6 +221,7 @@ namespace Detail {
} }
auto const& generator = static_cast<IGenerator<UnderlyingType> const&>( *tracker.getGenerator() ); auto const& generator = static_cast<IGenerator<UnderlyingType> const&>( *tracker.getGenerator() );
getResultCapture().trackGeneratorState(GeneratorInfo(definition, lineInfo, generator.currentElementAsString()));
return generator.get(); return generator.get();
} }
@ -227,14 +230,17 @@ namespace Detail {
#define GENERATE( ... ) \ #define GENERATE( ... ) \
Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \
INTERNAL_CATCH_STRINGIZE( __VA_ARGS__ ), \
CATCH_INTERNAL_LINEINFO, \ CATCH_INTERNAL_LINEINFO, \
[ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)
#define GENERATE_COPY( ... ) \ #define GENERATE_COPY( ... ) \
Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \
INTERNAL_CATCH_STRINGIZE( __VA_ARGS__ ), \
CATCH_INTERNAL_LINEINFO, \ CATCH_INTERNAL_LINEINFO, \
[=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)
#define GENERATE_REF( ... ) \ #define GENERATE_REF( ... ) \
Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \
INTERNAL_CATCH_STRINGIZE( __VA_ARGS__ ), \
CATCH_INTERNAL_LINEINFO, \ CATCH_INTERNAL_LINEINFO, \
[&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)

View File

@ -20,6 +20,7 @@ namespace Catch {
struct AssertionInfo; struct AssertionInfo;
struct SectionInfo; struct SectionInfo;
struct SectionEndInfo; struct SectionEndInfo;
struct GeneratorInfo;
struct MessageInfo; struct MessageInfo;
struct MessageBuilder; struct MessageBuilder;
struct Counts; struct Counts;
@ -43,6 +44,7 @@ namespace Catch {
virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0; virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0;
virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0;
virtual void trackGeneratorState( GeneratorInfo info ) = 0;
virtual void benchmarkPreparing( StringRef name ) = 0; virtual void benchmarkPreparing( StringRef name ) = 0;
virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0; virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0;

View File

@ -5,6 +5,7 @@
// https://www.boost.org/LICENSE_1_0.txt) // https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0 // SPDX-License-Identifier: BSL-1.0
#include "catch2/interfaces/catch_interfaces_capture.hpp"
#include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp> #include <catch2/interfaces/catch_interfaces_config.hpp>
#include <catch2/internal/catch_console_colour.hpp> #include <catch2/internal/catch_console_colour.hpp>
@ -49,9 +50,11 @@ namespace Catch {
AssertionStats::AssertionStats( AssertionResult const& _assertionResult, AssertionStats::AssertionStats( AssertionResult const& _assertionResult,
std::vector<MessageInfo> const& _infoMessages, std::vector<MessageInfo> const& _infoMessages,
std::vector<GeneratorInfo> const& _generatorInfos,
Totals const& _totals ) Totals const& _totals )
: assertionResult( _assertionResult ), : assertionResult( _assertionResult ),
infoMessages( _infoMessages ), infoMessages( _infoMessages ),
generatorInfos( _generatorInfos ),
totals( _totals ) totals( _totals )
{ {
assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression; assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression;

View File

@ -8,10 +8,12 @@
#ifndef CATCH_INTERFACES_REPORTER_HPP_INCLUDED #ifndef CATCH_INTERFACES_REPORTER_HPP_INCLUDED
#define CATCH_INTERFACES_REPORTER_HPP_INCLUDED #define CATCH_INTERFACES_REPORTER_HPP_INCLUDED
#include "catch2/interfaces/catch_interfaces_capture.hpp"
#include <catch2/catch_section_info.hpp> #include <catch2/catch_section_info.hpp>
#include <catch2/catch_totals.hpp> #include <catch2/catch_totals.hpp>
#include <catch2/catch_assertion_result.hpp> #include <catch2/catch_assertion_result.hpp>
#include <catch2/internal/catch_message_info.hpp> #include <catch2/internal/catch_message_info.hpp>
#include <catch2/internal/catch_generator_info.hpp>
#include <catch2/internal/catch_stringref.hpp> #include <catch2/internal/catch_stringref.hpp>
#include <catch2/internal/catch_unique_ptr.hpp> #include <catch2/internal/catch_unique_ptr.hpp>
#include <catch2/internal/catch_move_and_forward.hpp> #include <catch2/internal/catch_move_and_forward.hpp>
@ -65,6 +67,7 @@ namespace Catch {
struct AssertionStats { struct AssertionStats {
AssertionStats( AssertionResult const& _assertionResult, AssertionStats( AssertionResult const& _assertionResult,
std::vector<MessageInfo> const& _infoMessages, std::vector<MessageInfo> const& _infoMessages,
std::vector<GeneratorInfo> const& _generatorInfos,
Totals const& _totals ); Totals const& _totals );
AssertionStats( AssertionStats const& ) = default; AssertionStats( AssertionStats const& ) = default;
@ -74,6 +77,7 @@ namespace Catch {
AssertionResult assertionResult; AssertionResult assertionResult;
std::vector<MessageInfo> infoMessages; std::vector<MessageInfo> infoMessages;
std::vector<GeneratorInfo> generatorInfos;
Totals totals; Totals totals;
}; };

View File

@ -50,6 +50,7 @@ namespace Catch {
OriginalExpression = Cyan, OriginalExpression = Cyan,
ReconstructedExpression = BrightYellow, ReconstructedExpression = BrightYellow,
GeneratorValue = Cyan,
SecondaryText = LightGrey, SecondaryText = LightGrey,
Headers = White Headers = White

View File

@ -0,0 +1,20 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
#include <catch2/internal/catch_generator_info.hpp>
namespace Catch {
GeneratorInfo::GeneratorInfo( StringRef _definition,
SourceLineInfo const& _lineInfo,
StringRef _currentElement ):
definition( _definition ),
lineInfo( _lineInfo ),
currentElement( _currentElement ) {}
} // end namespace Catch

View File

@ -0,0 +1,35 @@
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
#ifndef CATCH_GENERATOR_INFO_HPP_INCLUDED
#define CATCH_GENERATOR_INFO_HPP_INCLUDED
#include <catch2/interfaces/catch_interfaces_capture.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <string>
namespace Catch {
struct GeneratorInfo {
GeneratorInfo( StringRef _definition,
SourceLineInfo const& _lineInfo,
StringRef currentElement );
StringRef definition;
SourceLineInfo lineInfo;
StringRef currentElement;
bool operator==( GeneratorInfo const& other ) const {
return definition == other.definition &&
lineInfo == other.lineInfo &&
currentElement == other.currentElement;
}
};
} // end namespace Catch
#endif // CATCH_GENERATOR_INFO_HPP_INCLUDED

View File

@ -283,7 +283,7 @@ namespace Catch {
m_lastAssertionPassed = true; m_lastAssertionPassed = true;
} }
m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)); m_reporter->assertionEnded(AssertionStats(result, m_messages, m_generatorInfos, m_totals));
if (result.getResultType() != ResultWas::Warning) if (result.getResultType() != ResultWas::Warning)
m_messageScopes.clear(); m_messageScopes.clear();
@ -319,6 +319,16 @@ namespace Catch {
return tracker; return tracker;
} }
void RunContext::trackGeneratorState( GeneratorInfo info ) {
// Avoid redundant entries, in case a generator is used within a loop.
if ( std::find( m_generatorInfos.cbegin(),
m_generatorInfos.cend(),
info ) != m_generatorInfos.cend() )
return;
m_generatorInfos.push_back( info );
}
bool RunContext::testForMissingAssertions(Counts& assertions) { bool RunContext::testForMissingAssertions(Counts& assertions) {
if (assertions.total() != 0) if (assertions.total() != 0)
return false; return false;
@ -343,6 +353,7 @@ namespace Catch {
m_reporter->sectionEnded(SectionStats(endInfo.sectionInfo, assertions, endInfo.durationInSeconds, missingAssertions)); m_reporter->sectionEnded(SectionStats(endInfo.sectionInfo, assertions, endInfo.durationInSeconds, missingAssertions));
m_messages.clear(); m_messages.clear();
m_messageScopes.clear(); m_messageScopes.clear();
m_generatorInfos.clear();
} }
void RunContext::sectionEndedEarly(SectionEndInfo const & endInfo) { void RunContext::sectionEndedEarly(SectionEndInfo const & endInfo) {
@ -490,6 +501,7 @@ namespace Catch {
handleUnfinishedSections(); handleUnfinishedSections();
m_messages.clear(); m_messages.clear();
m_messageScopes.clear(); m_messageScopes.clear();
m_generatorInfos.clear();
SectionStats testCaseSectionStats(testCaseSection, assertions, duration, missingAssertions); SectionStats testCaseSectionStats(testCaseSection, assertions, duration, missingAssertions);
m_reporter->sectionEnded(testCaseSectionStats); m_reporter->sectionEnded(testCaseSectionStats);

View File

@ -8,6 +8,7 @@
#ifndef CATCH_RUN_CONTEXT_HPP_INCLUDED #ifndef CATCH_RUN_CONTEXT_HPP_INCLUDED
#define CATCH_RUN_CONTEXT_HPP_INCLUDED #define CATCH_RUN_CONTEXT_HPP_INCLUDED
#include "catch2/interfaces/catch_interfaces_capture.hpp"
#include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/internal/catch_test_registry.hpp> #include <catch2/internal/catch_test_registry.hpp>
#include <catch2/internal/catch_fatal_condition_handler.hpp> #include <catch2/internal/catch_fatal_condition_handler.hpp>
@ -74,6 +75,7 @@ namespace Catch {
void sectionEndedEarly( SectionEndInfo const& endInfo ) override; void sectionEndedEarly( SectionEndInfo const& endInfo ) override;
auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override;
void trackGeneratorState( GeneratorInfo info ) override;
void benchmarkPreparing( StringRef name ) override; void benchmarkPreparing( StringRef name ) override;
void benchmarkStarting( BenchmarkInfo const& info ) override; void benchmarkStarting( BenchmarkInfo const& info ) override;
@ -132,6 +134,7 @@ namespace Catch {
Totals m_totals; Totals m_totals;
IEventListenerPtr m_reporter; IEventListenerPtr m_reporter;
std::vector<MessageInfo> m_messages; std::vector<MessageInfo> m_messages;
std::vector<GeneratorInfo> m_generatorInfos;
std::vector<ScopedMessage> m_messageScopes; /* Keeps owners of so-called unscoped messages. */ std::vector<ScopedMessage> m_messageScopes; /* Keeps owners of so-called unscoped messages. */
AssertionInfo m_lastAssertionInfo; AssertionInfo m_lastAssertionInfo;
std::vector<SectionEndInfo> m_unfinishedSections; std::vector<SectionEndInfo> m_unfinishedSections;

View File

@ -127,6 +127,7 @@ public:
printResultType(); printResultType();
printOriginalExpression(); printOriginalExpression();
printReconstructedExpression(); printReconstructedExpression();
printGeneratorStates();
} else { } else {
stream << '\n'; stream << '\n';
} }
@ -154,6 +155,21 @@ private:
<< '\n'; << '\n';
} }
} }
void printGeneratorStates() const {
if ( stats.generatorInfos.empty() ) {
return;
}
stream << "with " << pluralise(stats.generatorInfos.size(), "generator"_sr) << "\n";
for ( auto const& info : stats.generatorInfos ) {
stream << TextFlow::Column( "line:" ).indent( 2 )
<< info.lineInfo.line << ": "
<< "GENERATE(" << info.definition << ")\n"
<< TextFlow::Column( "value: " ).indent( 2 )
<< colourImpl->guardColour( Colour::GeneratorValue )
<< info.currentElement << "\n";
}
}
void printMessage() const { void printMessage() const {
if (!messageLabel.empty()) if (!messageLabel.empty())
stream << messageLabel << ':' << '\n'; stream << messageLabel << ':' << '\n';

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -228,6 +228,9 @@ Generators.tests.cpp:<line number>: PASSED:
REQUIRE( counter < 7 ) REQUIRE( counter < 7 )
with expansion: with expansion:
3 < 7 3 < 7
with 1 generator
line:267: GENERATE(1, 2)
value: 1
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1913 - GENERATE inside a for loop should not keep recreating the generator #1913 - GENERATE inside a for loop should not keep recreating the generator
@ -239,6 +242,9 @@ Generators.tests.cpp:<line number>: PASSED:
REQUIRE( counter < 7 ) REQUIRE( counter < 7 )
with expansion: with expansion:
6 < 7 6 < 7
with 1 generator
line:267: GENERATE(1, 2)
value: 2
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1913 - GENERATEs can share a line #1913 - GENERATEs can share a line
@ -250,6 +256,11 @@ Generators.tests.cpp:<line number>: PASSED:
REQUIRE( i != j ) REQUIRE( i != j )
with expansion: with expansion:
1 != 3 1 != 3
with 2 generators
line:276: GENERATE(1, 2)
value: 1
line:276: GENERATE(3, 4)
value: 3
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1913 - GENERATEs can share a line #1913 - GENERATEs can share a line
@ -261,6 +272,11 @@ Generators.tests.cpp:<line number>: PASSED:
REQUIRE( i != j ) REQUIRE( i != j )
with expansion: with expansion:
1 != 4 1 != 4
with 2 generators
line:276: GENERATE(1, 2)
value: 1
line:276: GENERATE(3, 4)
value: 4
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1913 - GENERATEs can share a line #1913 - GENERATEs can share a line
@ -272,6 +288,11 @@ Generators.tests.cpp:<line number>: PASSED:
REQUIRE( i != j ) REQUIRE( i != j )
with expansion: with expansion:
2 != 3 2 != 3
with 2 generators
line:276: GENERATE(1, 2)
value: 2
line:276: GENERATE(3, 4)
value: 3
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1913 - GENERATEs can share a line #1913 - GENERATEs can share a line
@ -283,6 +304,11 @@ Generators.tests.cpp:<line number>: PASSED:
REQUIRE( i != j ) REQUIRE( i != j )
with expansion: with expansion:
2 != 4 2 != 4
with 2 generators
line:276: GENERATE(1, 2)
value: 2
line:276: GENERATE(3, 4)
value: 4
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - GENERATE after a section #1938 - GENERATE after a section
@ -306,6 +332,9 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
1 1
with 1 generator
line:216: GENERATE(1, 2, 3)
value: 1
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - GENERATE after a section #1938 - GENERATE after a section
@ -318,6 +347,9 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
2 2
with 1 generator
line:216: GENERATE(1, 2, 3)
value: 2
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - GENERATE after a section #1938 - GENERATE after a section
@ -330,6 +362,9 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
3 3
with 1 generator
line:216: GENERATE(1, 2, 3)
value: 3
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - Section followed by flat generate #1938 - Section followed by flat generate
@ -351,6 +386,9 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
2 2
with 1 generator
line:252: GENERATE(2, 3)
value: 2
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - Section followed by flat generate #1938 - Section followed by flat generate
@ -362,6 +400,9 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
3 3
with 1 generator
line:252: GENERATE(2, 3)
value: 3
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - flat generate #1938 - flat generate
@ -373,6 +414,9 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
1 1
with 1 generator
line:223: GENERATE(1, 2, 3)
value: 1
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - flat generate #1938 - flat generate
@ -384,6 +428,9 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
2 2
with 1 generator
line:223: GENERATE(1, 2, 3)
value: 2
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - flat generate #1938 - flat generate
@ -395,6 +442,9 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
3 3
with 1 generator
line:223: GENERATE(1, 2, 3)
value: 3
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - mixed sections and generates #1938 - mixed sections and generates
@ -404,6 +454,9 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 1 generator
line:235: GENERATE(1, 2)
value: 1
with message: with message:
A A
@ -414,6 +467,11 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 2 generators
line:239: GENERATE(3, 4)
value: 3
line:243: GENERATE(5, 6)
value: 5
with messages: with messages:
i := 1 i := 1
j := 3 j := 3
@ -427,6 +485,11 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 2 generators
line:235: GENERATE(1, 2)
value: 1
line:239: GENERATE(3, 4)
value: 3
with message: with message:
B B
@ -437,6 +500,9 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 1 generator
line:243: GENERATE(5, 6)
value: 6
with messages: with messages:
i := 1 i := 1
j := 3 j := 3
@ -450,6 +516,11 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 2 generators
line:235: GENERATE(1, 2)
value: 1
line:239: GENERATE(3, 4)
value: 4
with message: with message:
B B
@ -460,6 +531,9 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 1 generator
line:243: GENERATE(5, 6)
value: 5
with messages: with messages:
i := 1 i := 1
j := 4 j := 4
@ -472,6 +546,13 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 3 generators
line:235: GENERATE(1, 2)
value: 1
line:239: GENERATE(3, 4)
value: 4
line:243: GENERATE(5, 6)
value: 6
with messages: with messages:
i := 1 i := 1
j := 4 j := 4
@ -485,6 +566,9 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 1 generator
line:235: GENERATE(1, 2)
value: 2
with message: with message:
A A
@ -495,6 +579,11 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 2 generators
line:239: GENERATE(3, 4)
value: 3
line:243: GENERATE(5, 6)
value: 5
with messages: with messages:
i := 2 i := 2
j := 3 j := 3
@ -508,6 +597,11 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 2 generators
line:235: GENERATE(1, 2)
value: 2
line:239: GENERATE(3, 4)
value: 3
with message: with message:
B B
@ -518,6 +612,9 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 1 generator
line:243: GENERATE(5, 6)
value: 6
with messages: with messages:
i := 2 i := 2
j := 3 j := 3
@ -531,6 +628,11 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 2 generators
line:235: GENERATE(1, 2)
value: 2
line:239: GENERATE(3, 4)
value: 4
with message: with message:
B B
@ -541,6 +643,9 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 1 generator
line:243: GENERATE(5, 6)
value: 5
with messages: with messages:
i := 2 i := 2
j := 4 j := 4
@ -553,6 +658,13 @@ PartTracker.tests.cpp:<line number>
............................................................................... ...............................................................................
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
with 3 generators
line:235: GENERATE(1, 2)
value: 2
line:239: GENERATE(3, 4)
value: 4
line:243: GENERATE(5, 6)
value: 6
with messages: with messages:
i := 2 i := 2
j := 4 j := 4
@ -568,11 +680,21 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
1 1
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 1
line:229: GENERATE(1, 2, 3)
value: 1
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( n ) REQUIRE( n )
with expansion: with expansion:
1 1
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 1
line:229: GENERATE(1, 2, 3)
value: 1
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - nested generate #1938 - nested generate
@ -584,11 +706,21 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
1 1
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 1
line:229: GENERATE(1, 2, 3)
value: 2
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( n ) REQUIRE( n )
with expansion: with expansion:
2 2
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 1
line:229: GENERATE(1, 2, 3)
value: 2
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - nested generate #1938 - nested generate
@ -600,11 +732,21 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
1 1
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 1
line:229: GENERATE(1, 2, 3)
value: 3
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( n ) REQUIRE( n )
with expansion: with expansion:
3 3
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 1
line:229: GENERATE(1, 2, 3)
value: 3
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - nested generate #1938 - nested generate
@ -616,11 +758,21 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
2 2
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 2
line:229: GENERATE(1, 2, 3)
value: 1
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( n ) REQUIRE( n )
with expansion: with expansion:
1 1
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 2
line:229: GENERATE(1, 2, 3)
value: 1
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - nested generate #1938 - nested generate
@ -632,11 +784,21 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
2 2
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 2
line:229: GENERATE(1, 2, 3)
value: 2
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( n ) REQUIRE( n )
with expansion: with expansion:
2 2
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 2
line:229: GENERATE(1, 2, 3)
value: 2
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - nested generate #1938 - nested generate
@ -648,11 +810,21 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
2 2
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 2
line:229: GENERATE(1, 2, 3)
value: 3
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( n ) REQUIRE( n )
with expansion: with expansion:
3 3
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 2
line:229: GENERATE(1, 2, 3)
value: 3
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - nested generate #1938 - nested generate
@ -664,11 +836,21 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
3 3
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 3
line:229: GENERATE(1, 2, 3)
value: 1
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( n ) REQUIRE( n )
with expansion: with expansion:
1 1
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 3
line:229: GENERATE(1, 2, 3)
value: 1
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - nested generate #1938 - nested generate
@ -680,11 +862,21 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
3 3
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 3
line:229: GENERATE(1, 2, 3)
value: 2
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( n ) REQUIRE( n )
with expansion: with expansion:
2 2
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 3
line:229: GENERATE(1, 2, 3)
value: 2
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1938 - nested generate #1938 - nested generate
@ -696,11 +888,21 @@ PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( m ) REQUIRE( m )
with expansion: with expansion:
3 3
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 3
line:229: GENERATE(1, 2, 3)
value: 3
PartTracker.tests.cpp:<line number>: PASSED: PartTracker.tests.cpp:<line number>: PASSED:
REQUIRE( n ) REQUIRE( n )
with expansion: with expansion:
3 3
with 2 generators
line:228: GENERATE(1, 2, 3)
value: 3
line:229: GENERATE(1, 2, 3)
value: 3
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 #1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0