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
Redo generator interface
- Commit
e46a70f8291b6673f82b156b53ad5f5df8dc48a2- Author
- Martin Hořeňovský ·
- Parents
64a9c02315c7
Changes
include/internal/catch_generators.cpp | 24 +- include/internal/catch_generators.hpp | 236 ++-- .../internal/catch_interfaces_generatortracker.h | 18 +- include/internal/catch_run_context.cpp | 20 +- include/internal/catch_test_case_tracker.cpp | 2 +- include/internal/catch_test_case_tracker.h | 4 +- .../SelfTest/Baselines/compact.sw.approved.txt | 270 ++--- .../SelfTest/Baselines/console.std.approved.txt | 4 +- .../SelfTest/Baselines/console.sw.approved.txt | 1256 ++++++-------------- projects/SelfTest/Baselines/junit.sw.approved.txt | 19 +- projects/SelfTest/Baselines/xml.sw.approved.txt | 955 +++++++-------- .../IntrospectiveTests/GeneratorsImpl.tests.cpp | 127 +- projects/SelfTest/UsageTests/Generators.tests.cpp | 101 +- 13 files changed, 1153 insertions(+), 1883 deletions(-) diff --git a/include/internal/catch_generators.cpp b/include/internal/catch_generators.cpp index 786da736..de6dc1fe 100644 --- a/include/internal/catch_generators.cpp +++ b/include/internal/catch_generators.cpp @@ -18,33 +18,11 @@ IGeneratorTracker::~IGeneratorTracker() {} namespace Generators { - GeneratorBase::~GeneratorBase() {} - - std::vector<size_t> randomiseIndices( size_t selectionSize, size_t sourceSize ) { - - assert( selectionSize <= sourceSize ); - std::vector<size_t> indices; - indices.reserve( selectionSize ); - std::uniform_int_distribution<size_t> uid( 0, sourceSize-1 ); - - std::set<size_t> seen; - // !TBD: improve this algorithm - while( indices.size() < selectionSize ) { - auto index = uid( rng() ); - if( seen.insert( index ).second ) - indices.push_back( index ); - } - return indices; - } + GeneratorUntypedBase::~GeneratorUntypedBase() {} auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { return getResultCapture().acquireGeneratorTracker( lineInfo ); } - template<> - auto all<int>() -> Generator<int> { - return range( std::numeric_limits<int>::min(), std::numeric_limits<int>::max() ); - } - } // namespace Generators } // namespace Catch diff --git a/include/internal/catch_generators.hpp b/include/internal/catch_generators.hpp index 4a446be1..92542fde 100644 --- a/include/internal/catch_generators.hpp +++ b/include/internal/catch_generators.hpp @@ -29,199 +29,140 @@ namespace Generators { } template<typename T> - struct IGenerator { - virtual ~IGenerator() {} - virtual auto get( size_t index ) const -> T = 0; + struct IGenerator : GeneratorUntypedBase { + virtual ~IGenerator() = default; + + // Returns the current element of the generator + // + // \Precondition The generator is either freshly constructed, + // or the last call to `next()` returned true + virtual T const& get() const = 0; + using type = T; }; template<typename T> - class SingleValueGenerator : public IGenerator<T> { + class SingleValueGenerator final : public IGenerator<T> { T m_value; public: - SingleValueGenerator( T const& value ) : m_value( value ) {} + SingleValueGenerator(T const& value) : m_value( value ) {} + SingleValueGenerator(T&& value) : m_value(std::move(value)) {} - auto get( size_t ) const -> T override { + T const& get() const override { return m_value; } + bool next() override { + return false; + } }; template<typename T> - class FixedValuesGenerator : public IGenerator<T> { + class FixedValuesGenerator final : public IGenerator<T> { std::vector<T> m_values; - + size_t m_idx = 0; public: FixedValuesGenerator( std::initializer_list<T> values ) : m_values( values ) {} - auto get( size_t index ) const -> T override { - return m_values[index]; + T const& get() const override { + return m_values[m_idx]; } - }; - - template<typename T> - class RangeGenerator : public IGenerator<T> { - T const m_first; - T const m_last; - - public: - RangeGenerator( T const& first, T const& last ) : m_first( first ), m_last( last ) { - assert( m_last > m_first ); - } - - auto get( size_t index ) const -> T override { - // ToDo:: introduce a safe cast to catch potential overflows - return static_cast<T>(m_first+index); - } - }; - - - template<typename T> - struct NullGenerator : IGenerator<T> { - auto get( size_t ) const -> T override { - CATCH_INTERNAL_ERROR("A Null Generator is always empty"); + bool next() override { + ++m_idx; + return m_idx < m_values.size(); } }; - template<typename T> - class Generator { + template <typename T> + class GeneratorWrapper final { std::unique_ptr<IGenerator<T>> m_generator; - size_t m_size; - public: - Generator( size_t size, std::unique_ptr<IGenerator<T>> generator ) - : m_generator( std::move( generator ) ), - m_size( size ) + GeneratorWrapper(std::unique_ptr<IGenerator<T>> generator): + m_generator(std::move(generator)) {} - - auto size() const -> size_t { return m_size; } - auto operator[]( size_t index ) const -> T { - assert( index < m_size ); - return m_generator->get( index ); + T const& get() const { + return m_generator->get(); } - }; - - std::vector<size_t> randomiseIndices( size_t selectionSize, size_t sourceSize ); - - template<typename T> - class GeneratorRandomiser : public IGenerator<T> { - Generator<T> m_baseGenerator; - - std::vector<size_t> m_indices; - public: - GeneratorRandomiser( Generator<T>&& baseGenerator, size_t numberOfItems ) - : m_baseGenerator( std::move( baseGenerator ) ), - m_indices( randomiseIndices( numberOfItems, m_baseGenerator.size() ) ) - {} - - auto get( size_t index ) const -> T override { - return m_baseGenerator[m_indices[index]]; + bool next() { + return m_generator->next(); } }; - template<typename T> - struct RequiresASpecialisationFor; - - template<typename T> - auto all() -> Generator<T> { return RequiresASpecialisationFor<T>(); } - - template<> - auto all<int>() -> Generator<int>; - - - template<typename T> - auto range( T const& first, T const& last ) -> Generator<T> { - return Generator<T>( (last-first), pf::make_unique<RangeGenerator<T>>( first, last ) ); - } - - template<typename T> - auto random( T const& first, T const& last ) -> Generator<T> { - auto gen = range( first, last ); - auto size = gen.size(); - - return Generator<T>( size, pf::make_unique<GeneratorRandomiser<T>>( std::move( gen ), size ) ); + template <typename T> + GeneratorWrapper<T> value(T&& value) { + return GeneratorWrapper<T>(pf::make_unique<SingleValueGenerator<T>>(std::forward<T>(value))); } - template<typename T> - auto random( size_t size ) -> Generator<T> { - return Generator<T>( size, pf::make_unique<GeneratorRandomiser<T>>( all<T>(), size ) ); + template <typename T> + GeneratorWrapper<T> values(std::initializer_list<T> values) { + return GeneratorWrapper<T>(pf::make_unique<FixedValuesGenerator<T>>(values)); } template<typename T> - auto values( std::initializer_list<T> values ) -> Generator<T> { - return Generator<T>( values.size(), pf::make_unique<FixedValuesGenerator<T>>( values ) ); - } - template<typename T> - auto value( T const& val ) -> Generator<T> { - return Generator<T>( 1, pf::make_unique<SingleValueGenerator<T>>( val ) ); - } - - template<typename T> - auto as() -> Generator<T> { - return Generator<T>( 0, pf::make_unique<NullGenerator<T>>() ); - } - - template<typename... Ts> - auto table( std::initializer_list<std::tuple<Ts...>>&& tuples ) -> Generator<std::tuple<Ts...>> { - return values<std::tuple<Ts...>>( std::forward<std::initializer_list<std::tuple<Ts...>>>( tuples ) ); - } - - - template<typename T> - struct Generators : GeneratorBase { - std::vector<Generator<T>> m_generators; + class Generators : public IGenerator<T> { + std::vector<GeneratorWrapper<T>> m_generators; + size_t m_current = 0; - using type = T; - - Generators() : GeneratorBase( 0 ) {} - - void populate( T&& val ) { - m_size += 1; - m_generators.emplace_back( value( std::move( val ) ) ); + void populate(GeneratorWrapper<T>&& generator) { + m_generators.emplace_back(std::move(generator)); + } + void populate(T&& val) { + m_generators.emplace_back(value(std::move(val))); } template<typename U> - void populate( U&& val ) { - populate( T( std::move( val ) ) ); + void populate(U&& val) { + populate(T(std::move(val))); } - void populate( Generator<T>&& generator ) { - m_size += generator.size(); - m_generators.emplace_back( std::move( generator ) ); + template<typename U, typename... Gs> + void populate(U&& valueOrGenerator, Gs... moreGenerators) { + populate(std::forward<U>(valueOrGenerator)); + populate(std::forward<Gs>(moreGenerators)...); } - template<typename U, typename... Gs> - void populate( U&& valueOrGenerator, Gs... moreGenerators ) { - populate( std::forward<U>( valueOrGenerator ) ); - populate( std::forward<Gs>( moreGenerators )... ); + public: + template <typename... Gs> + Generators(Gs... moreGenerators) { + m_generators.reserve(sizeof...(Gs)); + populate(std::forward<Gs>(moreGenerators)...); + } + + T const& get() const override { + return m_generators[m_current].get(); } - auto operator[]( size_t index ) const -> T { - size_t sizes = 0; - for( auto const& gen : m_generators ) { - auto localIndex = index-sizes; - sizes += gen.size(); - if( index < sizes ) - return gen[localIndex]; + bool next() override { + if (m_current >= m_generators.size()) { + return false; + } + const bool current_status = m_generators[m_current].next(); + if (!current_status) { + ++m_current; } - CATCH_INTERNAL_ERROR("Index '" << index << "' is out of range (" << sizes << ')'); + return m_current < m_generators.size(); } }; + + template<typename... Ts> + GeneratorWrapper<std::tuple<Ts...>> table( std::initializer_list<std::tuple<typename std::decay<Ts>::type...>> tuples ) { + return values<std::tuple<Ts...>>( tuples ); + } + + // Tag type to signal that a generator sequence should convert arguments to a specific type + template <typename T> + struct as {}; + template<typename T, typename... Gs> - auto makeGenerators( Generator<T>&& generator, Gs... moreGenerators ) -> Generators<T> { - Generators<T> generators; - generators.m_generators.reserve( 1+sizeof...(Gs) ); - generators.populate( std::move( generator ), std::forward<Gs>( moreGenerators )... ); - return generators; + auto makeGenerators( GeneratorWrapper<T>&& generator, Gs... moreGenerators ) -> Generators<T> { + return Generators<T>(std::move(generator), std::forward<Gs>(moreGenerators)...); } template<typename T> - auto makeGenerators( Generator<T>&& generator ) -> Generators<T> { - Generators<T> generators; - generators.populate( std::move( generator ) ); - return generators; + auto makeGenerators( GeneratorWrapper<T>&& generator ) -> Generators<T> { + return Generators<T>(std::move(generator)); } template<typename T, typename... Gs> auto makeGenerators( T&& val, Gs... moreGenerators ) -> Generators<T> { return makeGenerators( value( std::forward<T>( val ) ), std::forward<Gs>( moreGenerators )... ); } template<typename T, typename U, typename... Gs> - auto makeGenerators( U&& val, Gs... moreGenerators ) -> Generators<T> { + auto makeGenerators( as<T>, U&& val, Gs... moreGenerators ) -> Generators<T> { return makeGenerators( value( T( std::forward<U>( val ) ) ), std::forward<Gs>( moreGenerators )... ); } @@ -232,15 +173,16 @@ namespace Generators { // Note: The type after -> is weird, because VS2015 cannot parse // the expression used in the typedef inside, when it is in // return type. Yeah, ¯\_(ツ)_/¯ - auto generate( SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>()[0]) { + auto generate( SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) { using UnderlyingType = typename decltype(generatorExpression())::type; IGeneratorTracker& tracker = acquireGeneratorTracker( lineInfo ); - if( !tracker.hasGenerator() ) - tracker.setGenerator( pf::make_unique<Generators<UnderlyingType>>( generatorExpression() ) ); + if (!tracker.hasGenerator()) { + tracker.setGenerator(pf::make_unique<Generators<UnderlyingType>>(generatorExpression())); + } - auto const& generator = static_cast<Generators<UnderlyingType> const&>( *tracker.getGenerator() ); - return generator[tracker.getIndex()]; + auto const& generator = static_cast<IGenerator<UnderlyingType> const&>( *tracker.getGenerator() ); + return generator.get(); } } // namespace Generators diff --git a/include/internal/catch_interfaces_generatortracker.h b/include/internal/catch_interfaces_generatortracker.h index 2cf6269e..c1b1391f 100644 --- a/include/internal/catch_interfaces_generatortracker.h +++ b/include/internal/catch_interfaces_generatortracker.h @@ -13,16 +13,17 @@ namespace Catch { namespace Generators { - class GeneratorBase { - protected: - size_t m_size = 0; - + class GeneratorUntypedBase { public: - GeneratorBase( size_t size ) : m_size( size ) {} - virtual ~GeneratorBase(); - auto size() const -> size_t { return m_size; } + GeneratorUntypedBase() = default; + virtual ~GeneratorUntypedBase(); + // Attempts to move the generator to the next element + // + // Returns true iff the move succeeded (and a valid element + // can be retrieved). + virtual bool next() = 0; }; - using GeneratorBasePtr = std::unique_ptr<GeneratorBase>; + using GeneratorBasePtr = std::unique_ptr<GeneratorUntypedBase>; } // namespace Generators @@ -31,7 +32,6 @@ namespace Catch { virtual auto hasGenerator() const -> bool = 0; virtual auto getGenerator() const -> Generators::GeneratorBasePtr const& = 0; virtual void setGenerator( Generators::GeneratorBasePtr&& generator ) = 0; - virtual auto getIndex() const -> std::size_t = 0; }; } // namespace Catch diff --git a/include/internal/catch_run_context.cpp b/include/internal/catch_run_context.cpp index ffdd2ebb..77dcaae0 100644 --- a/include/internal/catch_run_context.cpp +++ b/include/internal/catch_run_context.cpp @@ -14,7 +14,6 @@ namespace Catch { namespace Generators { struct GeneratorTracker : TestCaseTracking::TrackerBase, IGeneratorTracker { - size_t m_index = static_cast<size_t>( -1 ); GeneratorBasePtr m_generator; GeneratorTracker( TestCaseTracking::NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) @@ -28,7 +27,7 @@ namespace Catch { ITracker& currentTracker = ctx.currentTracker(); if( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); - assert( childTracker->isIndexTracker() ); + assert( childTracker->isGeneratorTracker() ); tracker = std::static_pointer_cast<GeneratorTracker>( childTracker ); } else { @@ -37,28 +36,24 @@ namespace Catch { } if( !ctx.completedCycle() && !tracker->isComplete() ) { - if( tracker->m_runState != ExecutingChildren && tracker->m_runState != NeedsAnotherRun ) - tracker->moveNext(); tracker->open(); } return *tracker; } - void moveNext() { - m_index++; - m_children.clear(); - } - // TrackerBase interface - bool isIndexTracker() const override { return true; } + bool isGeneratorTracker() const override { return true; } auto hasGenerator() const -> bool override { return !!m_generator; } void close() override { TrackerBase::close(); - if( m_runState == CompletedSuccessfully && m_index < m_generator->size()-1 ) + // Generator interface only finds out if it has another item on atual move + if (m_runState == CompletedSuccessfully && m_generator->next()) { + m_children.clear(); m_runState = Executing; + } } // IGeneratorTracker interface @@ -68,9 +63,6 @@ namespace Catch { void setGenerator( GeneratorBasePtr&& generator ) override { m_generator = std::move( generator ); } - auto getIndex() const -> size_t override { - return m_index; - } }; GeneratorTracker::~GeneratorTracker() {} } diff --git a/include/internal/catch_test_case_tracker.cpp b/include/internal/catch_test_case_tracker.cpp index f6e5ac08..210f2730 100644 --- a/include/internal/catch_test_case_tracker.cpp +++ b/include/internal/catch_test_case_tracker.cpp @@ -121,7 +121,7 @@ namespace TestCaseTracking { } bool TrackerBase::isSectionTracker() const { return false; } - bool TrackerBase::isIndexTracker() const { return false; } + bool TrackerBase::isGeneratorTracker() const { return false; } void TrackerBase::open() { m_runState = Executing; diff --git a/include/internal/catch_test_case_tracker.h b/include/internal/catch_test_case_tracker.h index e873d788..17276001 100644 --- a/include/internal/catch_test_case_tracker.h +++ b/include/internal/catch_test_case_tracker.h @@ -54,7 +54,7 @@ namespace TestCaseTracking { // Debug/ checking virtual bool isSectionTracker() const = 0; - virtual bool isIndexTracker() const = 0; + virtual bool isGeneratorTracker() const = 0; }; class TrackerContext { @@ -120,7 +120,7 @@ namespace TestCaseTracking { void openChild() override; bool isSectionTracker() const override; - bool isIndexTracker() const override; + bool isGeneratorTracker() const override; void open(); diff --git a/projects/SelfTest/Baselines/compact.sw.approved.txt b/projects/SelfTest/Baselines/compact.sw.approved.txt index 72627f1f..174adc48 100644 --- a/projects/SelfTest/Baselines/compact.sw.approved.txt +++ b/projects/SelfTest/Baselines/compact.sw.approved.txt @@ -57,106 +57,87 @@ Tricky.tests.cpp:<line number>: passed: !is_true<false>::value for: true Tricky.tests.cpp:<line number>: passed: !!is_true<true>::value for: true Tricky.tests.cpp:<line number>: passed: is_true<true>::value for: true Tricky.tests.cpp:<line number>: passed: !(is_true<false>::value) for: !false -Generators.tests.cpp:<line number>: passed: x < y for: 1 < 101 -Generators.tests.cpp:<line number>: passed: x < y for: 1 < 102 -Generators.tests.cpp:<line number>: passed: x < y for: 1 < 103 -Generators.tests.cpp:<line number>: passed: x < y for: 1 < 104 -Generators.tests.cpp:<line number>: passed: x < y for: 1 < 105 -Generators.tests.cpp:<line number>: passed: x < y for: 1 < 106 -Generators.tests.cpp:<line number>: passed: x < y for: 1 < 107 -Generators.tests.cpp:<line number>: passed: x < y for: 1 < 108 -Generators.tests.cpp:<line number>: passed: x < y for: 1 < 109 -Generators.tests.cpp:<line number>: passed: x < y for: 1 < 110 -Generators.tests.cpp:<line number>: passed: x < y for: 2 < 101 -Generators.tests.cpp:<line number>: passed: x < y for: 2 < 102 -Generators.tests.cpp:<line number>: passed: x < y for: 2 < 103 -Generators.tests.cpp:<line number>: passed: x < y for: 2 < 104 -Generators.tests.cpp:<line number>: passed: x < y for: 2 < 105 -Generators.tests.cpp:<line number>: passed: x < y for: 2 < 106 -Generators.tests.cpp:<line number>: passed: x < y for: 2 < 107 -Generators.tests.cpp:<line number>: passed: x < y for: 2 < 108 -Generators.tests.cpp:<line number>: passed: x < y for: 2 < 109 -Generators.tests.cpp:<line number>: passed: x < y for: 2 < 110 -Generators.tests.cpp:<line number>: passed: x < y for: 3 < 101 -Generators.tests.cpp:<line number>: passed: x < y for: 3 < 102 -Generators.tests.cpp:<line number>: passed: x < y for: 3 < 103 -Generators.tests.cpp:<line number>: passed: x < y for: 3 < 104 -Generators.tests.cpp:<line number>: passed: x < y for: 3 < 105 -Generators.tests.cpp:<line number>: passed: x < y for: 3 < 106 -Generators.tests.cpp:<line number>: passed: x < y for: 3 < 107 -Generators.tests.cpp:<line number>: passed: x < y for: 3 < 108 -Generators.tests.cpp:<line number>: passed: x < y for: 3 < 109 -Generators.tests.cpp:<line number>: passed: x < y for: 3 < 110 -Generators.tests.cpp:<line number>: passed: x < y for: 4 < 101 -Generators.tests.cpp:<line number>: passed: x < y for: 4 < 102 -Generators.tests.cpp:<line number>: passed: x < y for: 4 < 103 -Generators.tests.cpp:<line number>: passed: x < y for: 4 < 104 -Generators.tests.cpp:<line number>: passed: x < y for: 4 < 105 -Generators.tests.cpp:<line number>: passed: x < y for: 4 < 106 -Generators.tests.cpp:<line number>: passed: x < y for: 4 < 107 -Generators.tests.cpp:<line number>: passed: x < y for: 4 < 108 -Generators.tests.cpp:<line number>: passed: x < y for: 4 < 109 -Generators.tests.cpp:<line number>: passed: x < y for: 4 < 110 -Generators.tests.cpp:<line number>: passed: x < y for: 5 < 101 -Generators.tests.cpp:<line number>: passed: x < y for: 5 < 102 -Generators.tests.cpp:<line number>: passed: x < y for: 5 < 103 -Generators.tests.cpp:<line number>: passed: x < y for: 5 < 104 -Generators.tests.cpp:<line number>: passed: x < y for: 5 < 105 -Generators.tests.cpp:<line number>: passed: x < y for: 5 < 106 -Generators.tests.cpp:<line number>: passed: x < y for: 5 < 107 -Generators.tests.cpp:<line number>: passed: x < y for: 5 < 108 -Generators.tests.cpp:<line number>: passed: x < y for: 5 < 109 -Generators.tests.cpp:<line number>: passed: x < y for: 5 < 110 -Generators.tests.cpp:<line number>: passed: x < y for: 6 < 101 -Generators.tests.cpp:<line number>: passed: x < y for: 6 < 102 -Generators.tests.cpp:<line number>: passed: x < y for: 6 < 103 -Generators.tests.cpp:<line number>: passed: x < y for: 6 < 104 -Generators.tests.cpp:<line number>: passed: x < y for: 6 < 105 -Generators.tests.cpp:<line number>: passed: x < y for: 6 < 106 -Generators.tests.cpp:<line number>: passed: x < y for: 6 < 107 -Generators.tests.cpp:<line number>: passed: x < y for: 6 < 108 -Generators.tests.cpp:<line number>: passed: x < y for: 6 < 109 -Generators.tests.cpp:<line number>: passed: x < y for: 6 < 110 -Generators.tests.cpp:<line number>: passed: x < y for: 7 < 101 -Generators.tests.cpp:<line number>: passed: x < y for: 7 < 102 -Generators.tests.cpp:<line number>: passed: x < y for: 7 < 103 -Generators.tests.cpp:<line number>: passed: x < y for: 7 < 104 -Generators.tests.cpp:<line number>: passed: x < y for: 7 < 105 -Generators.tests.cpp:<line number>: passed: x < y for: 7 < 106 -Generators.tests.cpp:<line number>: passed: x < y for: 7 < 107 -Generators.tests.cpp:<line number>: passed: x < y for: 7 < 108 -Generators.tests.cpp:<line number>: passed: x < y for: 7 < 109 -Generators.tests.cpp:<line number>: passed: x < y for: 7 < 110 -Generators.tests.cpp:<line number>: passed: x < y for: 8 < 101 -Generators.tests.cpp:<line number>: passed: x < y for: 8 < 102 -Generators.tests.cpp:<line number>: passed: x < y for: 8 < 103 -Generators.tests.cpp:<line number>: passed: x < y for: 8 < 104 -Generators.tests.cpp:<line number>: passed: x < y for: 8 < 105 -Generators.tests.cpp:<line number>: passed: x < y for: 8 < 106 -Generators.tests.cpp:<line number>: passed: x < y for: 8 < 107 -Generators.tests.cpp:<line number>: passed: x < y for: 8 < 108 -Generators.tests.cpp:<line number>: passed: x < y for: 8 < 109 -Generators.tests.cpp:<line number>: passed: x < y for: 8 < 110 -Generators.tests.cpp:<line number>: passed: x < y for: 9 < 101 -Generators.tests.cpp:<line number>: passed: x < y for: 9 < 102 -Generators.tests.cpp:<line number>: passed: x < y for: 9 < 103 -Generators.tests.cpp:<line number>: passed: x < y for: 9 < 104 -Generators.tests.cpp:<line number>: passed: x < y for: 9 < 105 -Generators.tests.cpp:<line number>: passed: x < y for: 9 < 106 -Generators.tests.cpp:<line number>: passed: x < y for: 9 < 107 -Generators.tests.cpp:<line number>: passed: x < y for: 9 < 108 -Generators.tests.cpp:<line number>: passed: x < y for: 9 < 109 -Generators.tests.cpp:<line number>: passed: x < y for: 9 < 110 -Generators.tests.cpp:<line number>: passed: x < y for: 10 < 101 -Generators.tests.cpp:<line number>: passed: x < y for: 10 < 102 -Generators.tests.cpp:<line number>: passed: x < y for: 10 < 103 -Generators.tests.cpp:<line number>: passed: x < y for: 10 < 104 -Generators.tests.cpp:<line number>: passed: x < y for: 10 < 105 -Generators.tests.cpp:<line number>: passed: x < y for: 10 < 106 -Generators.tests.cpp:<line number>: passed: x < y for: 10 < 107 -Generators.tests.cpp:<line number>: passed: x < y for: 10 < 108 -Generators.tests.cpp:<line number>: passed: x < y for: 10 < 109 -Generators.tests.cpp:<line number>: passed: x < y for: 10 < 110 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 3 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 3 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 3 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 3 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 3 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 3 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 3 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 3 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 3 < 9 Class.tests.cpp:<line number>: failed: s == "world" for: "hello" == "world" Class.tests.cpp:<line number>: passed: s == "hello" for: "hello" == "hello" Class.tests.cpp:<line number>: failed: Template_Fixture_2<TestType>::m_a.size() == 1 for: 0 == 1 @@ -418,48 +399,49 @@ Matchers.tests.cpp:<line number>: passed: WithinAbs(1.f, 0.f) Matchers.tests.cpp:<line number>: passed: WithinAbs(1.f, -1.f), std::domain_error Matchers.tests.cpp:<line number>: passed: WithinULP(1.f, 0) Matchers.tests.cpp:<line number>: passed: WithinULP(1.f, -1), std::domain_error -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 8' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 9' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 10' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 2' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 3.141' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "a"' and 'j := 1.379' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 8' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 9' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 10' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 2' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 3.141' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "b"' and 'j := 1.379' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 8' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 9' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 10' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 2' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 3.141' -Generators.tests.cpp:<line number>: passed: with 2 messages: 'i := "c"' and 'j := 1.379' -GeneratorsImpl.tests.cpp:<line number>: passed: gen.size() == 2 for: 2 == 2 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[0] == 1 for: 1 == 1 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[1] == 2 for: 2 == 2 -GeneratorsImpl.tests.cpp:<line number>: passed: gen.size() == 4 for: 4 == 4 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[0] == 3 for: 3 == 3 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[1] == 1 for: 1 == 1 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[2] == 4 for: 4 == 4 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[3] == 1 for: 1 == 1 -GeneratorsImpl.tests.cpp:<line number>: passed: gen.size() == 4 for: 4 == 4 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[0] == 1 for: 1 == 1 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[1] == 2 for: 2 == 2 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[2] == 9 for: 9 == 9 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[3] == 7 for: 7 == 7 -GeneratorsImpl.tests.cpp:<line number>: passed: gen.size() == 2 for: 2 == 2 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[0] == 3 for: 3 == 3 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[1] == 1 for: 1 == 1 -GeneratorsImpl.tests.cpp:<line number>: passed: gen.size() == 2 for: 2 == 2 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[0] == 3 for: 3 == 3 -GeneratorsImpl.tests.cpp:<line number>: passed: gen[1] == 1 for: 1 == 1 -GeneratorsImpl.tests.cpp:<line number>: passed: base->size() == 4 for: 4 == 4 -GeneratorsImpl.tests.cpp:<line number>: passed: typed for: 0x<hex digits> -GeneratorsImpl.tests.cpp:<line number>: passed: typed->size() == 4 for: 4 == 4 -GeneratorsImpl.tests.cpp:<line number>: passed: (*typed)[0] == 7 for: 7 == 7 -GeneratorsImpl.tests.cpp:<line number>: passed: (*typed)[3] == 11 for: 11 == 11 +Generators.tests.cpp:<line number>: passed: j < i for: -3 < 1 +Generators.tests.cpp:<line number>: passed: j < i for: -2 < 1 +Generators.tests.cpp:<line number>: passed: j < i for: -1 < 1 +Generators.tests.cpp:<line number>: passed: 4u * i > str.size() for: 4 > 1 +Generators.tests.cpp:<line number>: passed: 4u * i > str.size() for: 4 > 2 +Generators.tests.cpp:<line number>: passed: 4u * i > str.size() for: 4 > 3 +Generators.tests.cpp:<line number>: passed: j < i for: -3 < 2 +Generators.tests.cpp:<line number>: passed: j < i for: -2 < 2 +Generators.tests.cpp:<line number>: passed: j < i for: -1 < 2 +Generators.tests.cpp:<line number>: passed: 4u * i > str.size() for: 8 > 1 +Generators.tests.cpp:<line number>: passed: 4u * i > str.size() for: 8 > 2 +Generators.tests.cpp:<line number>: passed: 4u * i > str.size() for: 8 > 3 +Generators.tests.cpp:<line number>: passed: j < i for: -3 < 3 +Generators.tests.cpp:<line number>: passed: j < i for: -2 < 3 +Generators.tests.cpp:<line number>: passed: j < i for: -1 < 3 +Generators.tests.cpp:<line number>: passed: 4u * i > str.size() for: 12 > 1 +Generators.tests.cpp:<line number>: passed: 4u * i > str.size() for: 12 > 2 +Generators.tests.cpp:<line number>: passed: 4u * i > str.size() for: 12 > 3 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == 123 for: 123 == 123 +GeneratorsImpl.tests.cpp:<line number>: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:<line number>: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == 4 for: 4 == 4 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == 0 for: 0 == 0 +GeneratorsImpl.tests.cpp:<line number>: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get().size() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == "aa" for: "aa" == "aa" +GeneratorsImpl.tests.cpp:<line number>: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == "bb" for: "bb" == "bb" +GeneratorsImpl.tests.cpp:<line number>: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:<line number>: passed: gen.get() == "cc" for: "cc" == "cc" +GeneratorsImpl.tests.cpp:<line number>: passed: !(gen.next()) for: !false Approx.tests.cpp:<line number>: passed: d >= Approx( 1.22 ) for: 1.23 >= Approx( 1.22 ) 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.24 )) for: !(1.23 >= Approx( 1.24 )) @@ -1274,6 +1256,10 @@ Generators.tests.cpp:<line number>: passed: data.str.size() == data.len for: 3 = Generators.tests.cpp:<line number>: passed: data.str.size() == data.len for: 3 == 3 Generators.tests.cpp:<line number>: passed: data.str.size() == data.len for: 5 == 5 Generators.tests.cpp:<line number>: passed: data.str.size() == data.len for: 4 == 4 +Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 5 == 5 +Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 6 == 6 +Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 5 == 5 +Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 6 == 6 Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'Why would you throw a std::string?' Misc.tests.cpp:<line number>: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" Misc.tests.cpp:<line number>: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index dff912cf..750596b8 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -1170,6 +1170,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 243 | 183 passed | 56 failed | 4 failed as expected -assertions: 1262 | 1126 passed | 115 failed | 21 failed as expected +test cases: 244 | 184 passed | 56 failed | 4 failed as expected +assertions: 1248 | 1112 passed | 115 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index 79334630..bb06d688 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -456,7 +456,7 @@ with expansion: !false ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -464,142 +464,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 1 < 101 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 1 < 102 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 1 < 103 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 1 < 104 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 1 < 105 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 1 < 106 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 1 < 107 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 1 < 108 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 1 < 109 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 1 < 110 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 2 < 101 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 1 < 4 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 2 < 102 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 4 < 7 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 2 < 103 + 1 < 7 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -607,32 +485,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 2 < 104 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 1 < 4 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 2 < 105 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 4 < 8 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 2 < 106 + 1 < 8 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -640,32 +506,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 2 < 107 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 1 < 4 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 2 < 108 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 4 < 9 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 2 < 109 + 1 < 9 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -673,32 +527,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 2 < 110 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 1 < 5 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 3 < 101 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 5 < 7 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 3 < 102 + 1 < 7 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -706,32 +548,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 3 < 103 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 1 < 5 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 3 < 104 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 5 < 8 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 3 < 105 + 1 < 8 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -739,32 +569,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 3 < 106 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 1 < 5 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 3 < 107 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 5 < 9 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 3 < 108 + 1 < 9 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -772,32 +590,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 3 < 109 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 1 < 6 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 3 < 110 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 6 < 7 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 4 < 101 + 1 < 7 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -805,32 +611,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 4 < 102 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 1 < 6 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 4 < 103 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 6 < 8 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 4 < 104 + 1 < 8 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -838,32 +632,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 4 < 105 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 1 < 6 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 4 < 106 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 6 < 9 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 4 < 107 + 1 < 9 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -871,32 +653,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 4 < 108 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 2 < 4 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 4 < 109 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 4 < 7 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 4 < 110 + 2 < 7 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -904,307 +674,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 5 < 101 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 2 < 4 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + CHECK( y < z ) with expansion: - 5 < 102 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... + 4 < 8 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 5 < 103 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 5 < 104 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 5 < 105 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 5 < 106 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 5 < 107 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 5 < 108 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 5 < 109 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 5 < 110 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 6 < 101 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 6 < 102 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 6 < 103 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 6 < 104 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 6 < 105 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 6 < 106 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 6 < 107 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 6 < 108 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 6 < 109 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 6 < 110 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 7 < 101 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 7 < 102 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 7 < 103 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 7 < 104 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 7 < 105 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 7 < 106 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) -with expansion: - 7 < 107 - -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... - -Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 7 < 108 + 2 < 8 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1212,21 +695,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 7 < 109 + 2 < 4 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 4 < 9 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 7 < 110 + 2 < 9 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1234,21 +716,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 8 < 101 + 2 < 5 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 5 < 7 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 8 < 102 + 2 < 7 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1256,21 +737,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 8 < 103 + 2 < 5 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 5 < 8 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 8 < 104 + 2 < 8 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1278,21 +758,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 8 < 105 + 2 < 5 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 5 < 9 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 8 < 106 + 2 < 9 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1300,21 +779,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 8 < 107 + 2 < 6 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 6 < 7 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 8 < 108 + 2 < 7 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1322,21 +800,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 8 < 109 + 2 < 6 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 6 < 8 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 8 < 110 + 2 < 8 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1344,21 +821,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 9 < 101 + 2 < 6 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 6 < 9 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 9 < 102 + 2 < 9 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1366,21 +842,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 9 < 103 + 3 < 4 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 4 < 7 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 9 < 104 + 3 < 7 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1388,21 +863,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 9 < 105 + 3 < 4 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 4 < 8 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 9 < 106 + 3 < 8 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1410,21 +884,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 9 < 107 + 3 < 4 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 4 < 9 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 9 < 108 + 3 < 9 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1432,21 +905,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 9 < 109 + 3 < 5 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 5 < 7 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 9 < 110 + 3 < 7 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1454,21 +926,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 10 < 101 + 3 < 5 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 5 < 8 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 10 < 102 + 3 < 8 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1476,21 +947,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 10 < 103 + 3 < 5 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 5 < 9 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 10 < 104 + 3 < 9 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1498,21 +968,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 10 < 105 + 3 < 6 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 6 < 7 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 10 < 106 + 3 < 7 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1520,21 +989,20 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 10 < 107 + 3 < 6 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 6 < 8 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 10 < 108 + 3 < 8 ------------------------------------------------------------------------------- -10x10 ints +3x3x3 ints ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... @@ -1542,18 +1010,17 @@ Generators.tests.cpp:<line number> Generators.tests.cpp:<line number>: PASSED: CHECK( x < y ) with expansion: - 10 < 109 + 3 < 6 -------------------------------------------------------------------------------- -10x10 ints -------------------------------------------------------------------------------- -Generators.tests.cpp:<line number> -............................................................................... +Generators.tests.cpp:<line number>: PASSED: + CHECK( y < z ) +with expansion: + 6 < 9 Generators.tests.cpp:<line number>: PASSED: - CHECK( x < y ) + REQUIRE( x < z ) with expansion: - 10 < 110 + 3 < 9 ------------------------------------------------------------------------------- A METHOD_AS_TEST_CASE based test run that fails @@ -3384,382 +2851,373 @@ Matchers.tests.cpp:<line number>: PASSED: REQUIRE_THROWS_AS( WithinULP(1.f, -1), std::domain_error ) ------------------------------------------------------------------------------- -Generators +Generators -- simple one ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "a" - j := 8 + REQUIRE( j < i ) +with expansion: + -3 < 1 ------------------------------------------------------------------------------- -Generators +Generators -- simple one ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "a" - j := 9 + REQUIRE( j < i ) +with expansion: + -2 < 1 ------------------------------------------------------------------------------- -Generators +Generators -- simple one ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "a" - j := 10 + REQUIRE( j < i ) +with expansion: + -1 < 1 ------------------------------------------------------------------------------- -Generators - one +Generators -- simple + two ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "a" - j := 2 + REQUIRE( 4u * i > str.size() ) +with expansion: + 4 > 1 ------------------------------------------------------------------------------- -Generators +Generators -- simple two ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "a" - j := 3.141 + REQUIRE( 4u * i > str.size() ) +with expansion: + 4 > 2 ------------------------------------------------------------------------------- -Generators +Generators -- simple two ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "a" - j := 1.379 + REQUIRE( 4u * i > str.size() ) +with expansion: + 4 > 3 ------------------------------------------------------------------------------- -Generators +Generators -- simple one ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "b" - j := 8 + REQUIRE( j < i ) +with expansion: + -3 < 2 ------------------------------------------------------------------------------- -Generators +Generators -- simple one ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "b" - j := 9 + REQUIRE( j < i ) +with expansion: + -2 < 2 ------------------------------------------------------------------------------- -Generators +Generators -- simple one ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "b" - j := 10 + REQUIRE( j < i ) +with expansion: + -1 < 2 ------------------------------------------------------------------------------- -Generators - one +Generators -- simple + two ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "b" - j := 2 + REQUIRE( 4u * i > str.size() ) +with expansion: + 8 > 1 ------------------------------------------------------------------------------- -Generators +Generators -- simple two ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "b" - j := 3.141 + REQUIRE( 4u * i > str.size() ) +with expansion: + 8 > 2 ------------------------------------------------------------------------------- -Generators +Generators -- simple two ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "b" - j := 1.379 + REQUIRE( 4u * i > str.size() ) +with expansion: + 8 > 3 ------------------------------------------------------------------------------- -Generators +Generators -- simple one ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "c" - j := 8 + REQUIRE( j < i ) +with expansion: + -3 < 3 ------------------------------------------------------------------------------- -Generators +Generators -- simple one ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "c" - j := 9 + REQUIRE( j < i ) +with expansion: + -2 < 3 ------------------------------------------------------------------------------- -Generators +Generators -- simple one ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "c" - j := 10 + REQUIRE( j < i ) +with expansion: + -1 < 3 ------------------------------------------------------------------------------- -Generators - one +Generators -- simple + two ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "c" - j := 2 + REQUIRE( 4u * i > str.size() ) +with expansion: + 12 > 1 ------------------------------------------------------------------------------- -Generators +Generators -- simple two ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "c" - j := 3.141 + REQUIRE( 4u * i > str.size() ) +with expansion: + 12 > 2 ------------------------------------------------------------------------------- -Generators +Generators -- simple two ------------------------------------------------------------------------------- Generators.tests.cpp:<line number> ............................................................................... Generators.tests.cpp:<line number>: PASSED: -with messages: - i := "c" - j := 1.379 + REQUIRE( 4u * i > str.size() ) +with expansion: + 12 > 3 ------------------------------------------------------------------------------- -Generators impl - range +Generators internals + Single value ------------------------------------------------------------------------------- GeneratorsImpl.tests.cpp:<line number> ............................................................................... GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen.size() == 2 ) -with expansion: - 2 == 2 - -GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[0] == 1 ) + REQUIRE( gen.get() == 123 ) with expansion: - 1 == 1 + 123 == 123 GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[1] == 2 ) + REQUIRE_FALSE( gen.next() ) with expansion: - 2 == 2 + !false ------------------------------------------------------------------------------- -Generators impl - fixed values +Generators internals + Preset values ------------------------------------------------------------------------------- GeneratorsImpl.tests.cpp:<line number> ............................................................................... GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen.size() == 4 ) + REQUIRE( gen.get() == 1 ) with expansion: - 4 == 4 + 1 == 1 + +GeneratorsImpl.tests.cpp:<line number>: PASSED: + REQUIRE( gen.next() ) +with expansion: + true GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[0] == 3 ) + REQUIRE( gen.get() == 3 ) with expansion: 3 == 3 GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[1] == 1 ) + REQUIRE( gen.next() ) with expansion: - 1 == 1 + true GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[2] == 4 ) + REQUIRE( gen.get() == 5 ) with expansion: - 4 == 4 + 5 == 5 GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[3] == 1 ) + REQUIRE_FALSE( gen.next() ) with expansion: - 1 == 1 + !false ------------------------------------------------------------------------------- -Generators impl - combined +Generators internals + Generator combinator ------------------------------------------------------------------------------- GeneratorsImpl.tests.cpp:<line number> ............................................................................... GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen.size() == 4 ) -with expansion: - 4 == 4 - -GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[0] == 1 ) + REQUIRE( gen.get() == 1 ) with expansion: 1 == 1 GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[1] == 2 ) + REQUIRE( gen.next() ) with expansion: - 2 == 2 + true GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[2] == 9 ) + REQUIRE( gen.get() == 5 ) with expansion: - 9 == 9 + 5 == 5 GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[3] == 7 ) + REQUIRE( gen.next() ) with expansion: - 7 == 7 - -------------------------------------------------------------------------------- -Generators impl - values -------------------------------------------------------------------------------- -GeneratorsImpl.tests.cpp:<line number> -............................................................................... + true GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen.size() == 2 ) + REQUIRE( gen.get() == 2 ) with expansion: 2 == 2 GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[0] == 3 ) + REQUIRE( gen.next() ) with expansion: - 3 == 3 + true GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[1] == 1 ) + REQUIRE( gen.get() == 4 ) with expansion: - 1 == 1 - -------------------------------------------------------------------------------- -Generators impl - values2 -------------------------------------------------------------------------------- -GeneratorsImpl.tests.cpp:<line number> -............................................................................... + 4 == 4 GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen.size() == 2 ) + REQUIRE( gen.next() ) with expansion: - 2 == 2 + true GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[0] == 3 ) + REQUIRE( gen.get() == 0 ) with expansion: - 3 == 3 + 0 == 0 GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( gen[1] == 1 ) + REQUIRE_FALSE( gen.next() ) with expansion: - 1 == 1 + !false ------------------------------------------------------------------------------- -Generators impl - type erasure +Generators internals + Explicitly typed generator sequence ------------------------------------------------------------------------------- GeneratorsImpl.tests.cpp:<line number> ............................................................................... GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( base->size() == 4 ) + REQUIRE( gen.get().size() == 2 ) with expansion: - 4 == 4 + 2 == 2 GeneratorsImpl.tests.cpp:<line number>: PASSED: - REQUIRE( typed ) + REQUIRE( gen.get() == "aa" ) with expansion: - 0x<hex digits> + "aa" == "aa" GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( typed->size() == 4 ) + REQUIRE( gen.next() ) with expansion: - 4 == 4 + true GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( (*typed)[0] == 7 ) + REQUIRE( gen.get() == "bb" ) with expansion: - 7 == 7 + "bb" == "bb" GeneratorsImpl.tests.cpp:<line number>: PASSED: - CHECK( (*typed)[3] == 11 ) + REQUIRE( gen.next() ) with expansion: - 11 == 11 + true + +GeneratorsImpl.tests.cpp:<line number>: PASSED: + REQUIRE( gen.get() == "cc" ) +with expansion: + "cc" == "cc" + +GeneratorsImpl.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false ------------------------------------------------------------------------------- Greater-than inequalities with different epsilons @@ -9747,6 +9205,50 @@ Generators.tests.cpp:<line number>: PASSED: with expansion: 4 == 4 +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) ) +with expansion: + 5 == 5 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) ) +with expansion: + 6 == 6 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) ) +with expansion: + 5 == 5 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) ) +with expansion: + 6 == 6 + ------------------------------------------------------------------------------- thrown std::strings are translated ------------------------------------------------------------------------------- @@ -10224,6 +9726,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 243 | 170 passed | 69 failed | 4 failed as expected -assertions: 1276 | 1126 passed | 129 failed | 21 failed as expected +test cases: 244 | 171 passed | 69 failed | 4 failed as expected +assertions: 1262 | 1112 passed | 129 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index 17cc8281..3e23fdbd 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuitesloose text artifact > - <testsuite name="<exe-name>" errors="17" failures="113" tests="1277" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="113" tests="1263" 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}"/> @@ -70,7 +70,7 @@ Condition.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/negation" time="{duration}"/> <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/double negation" time="{duration}"/> <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/direct" time="{duration}"/> - <testcase classname="<exe-name>.global" name="10x10 ints" time="{duration}"/> + <testcase classname="<exe-name>.global" name="3x3x3 ints" time="{duration}"/> <testcase classname="<exe-name>.TestClass" name="A METHOD_AS_TEST_CASE based test run that fails" time="{duration}"> <failure message=""hello" == "world"" type="REQUIRE"> Class.tests.cpp:<line number> @@ -339,14 +339,12 @@ Message.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Floating point matchers: float/ULPs" time="{duration}"/> <testcase classname="<exe-name>.global" name="Floating point matchers: float/Composed" time="{duration}"/> <testcase classname="<exe-name>.global" name="Floating point matchers: float/Constructor validation" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators/one" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators/two" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators impl/range" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators impl/fixed values" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators impl/combined" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators impl/values" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators impl/values2" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators impl/type erasure" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators -- simple/one" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators -- simple/two" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators internals/Single value" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators internals/Preset values" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators internals/Generator combinator" time="{duration}"/> + <testcase classname="<exe-name>.global" name="Generators internals/Explicitly typed generator sequence" time="{duration}"/> <testcase classname="<exe-name>.global" name="Greater-than inequalities with different epsilons" time="{duration}"/> <testcase classname="<exe-name>.global" name="INFO and WARN do not abort tests" time="{duration}"/> <testcase classname="<exe-name>.global" name="INFO gets logged on failure" time="{duration}"> @@ -938,6 +936,7 @@ Tricky.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="stringify( vectors<has_maker_and_operator> )" time="{duration}"/> <testcase classname="<exe-name>.global" name="stringify( vectors<has_operator> )" time="{duration}"/> <testcase classname="<exe-name>.global" name="strlen3" time="{duration}"/> + <testcase classname="<exe-name>.global" name="tables" time="{duration}"/> <testcase classname="<exe-name>.global" name="thrown std::strings are translated" time="{duration}"> <error type="TEST_CASE"> Why would you throw a std::string? diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index 497d8168..6375db17 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -522,181 +522,29 @@ </Section> <OverallResult success="true"/> </TestCase> - <TestCase name="10x10 ints" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <TestCase name="3x3x3 ints" tags="[generators]" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> x < y </Original> <Expanded> - 1 < 101 + 1 < 4 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y - </Original> - <Expanded> - 1 < 102 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 1 < 103 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 1 < 104 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y + y < z </Original> <Expanded> - 1 < 105 + 4 < 7 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 1 < 106 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 1 < 107 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 1 < 108 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 1 < 109 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 1 < 110 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 2 < 101 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 2 < 102 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 2 < 103 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 2 < 104 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 2 < 105 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 2 < 106 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 2 < 107 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 2 < 108 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 2 < 109 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 2 < 110 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Original> - x < y - </Original> - <Expanded> - 3 < 101 - </Expanded> - </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 3 < 102 + 1 < 7 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -704,23 +552,23 @@ x < y </Original> <Expanded> - 3 < 103 + 1 < 4 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 3 < 104 + 4 < 8 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 3 < 105 + 1 < 8 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -728,23 +576,23 @@ x < y </Original> <Expanded> - 3 < 106 + 1 < 4 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 3 < 107 + 4 < 9 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 3 < 108 + 1 < 9 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -752,23 +600,23 @@ x < y </Original> <Expanded> - 3 < 109 + 1 < 5 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 3 < 110 + 5 < 7 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 4 < 101 + 1 < 7 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -776,23 +624,23 @@ x < y </Original> <Expanded> - 4 < 102 + 1 < 5 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 4 < 103 + 5 < 8 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 4 < 104 + 1 < 8 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -800,23 +648,23 @@ x < y </Original> <Expanded> - 4 < 105 + 1 < 5 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 4 < 106 + 5 < 9 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 4 < 107 + 1 < 9 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -824,23 +672,23 @@ x < y </Original> <Expanded> - 4 < 108 + 1 < 6 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 4 < 109 + 6 < 7 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 4 < 110 + 1 < 7 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -848,23 +696,23 @@ x < y </Original> <Expanded> - 5 < 101 + 1 < 6 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 5 < 102 + 6 < 8 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 5 < 103 + 1 < 8 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -872,23 +720,23 @@ x < y </Original> <Expanded> - 5 < 104 + 1 < 6 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 5 < 105 + 6 < 9 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 5 < 106 + 1 < 9 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -896,23 +744,23 @@ x < y </Original> <Expanded> - 5 < 107 + 2 < 4 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 5 < 108 + 4 < 7 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 5 < 109 + 2 < 7 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -920,23 +768,23 @@ x < y </Original> <Expanded> - 5 < 110 + 2 < 4 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 6 < 101 + 4 < 8 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 6 < 102 + 2 < 8 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -944,23 +792,23 @@ x < y </Original> <Expanded> - 6 < 103 + 2 < 4 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 6 < 104 + 4 < 9 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 6 < 105 + 2 < 9 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -968,23 +816,23 @@ x < y </Original> <Expanded> - 6 < 106 + 2 < 5 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 6 < 107 + 5 < 7 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 6 < 108 + 2 < 7 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -992,23 +840,23 @@ x < y </Original> <Expanded> - 6 < 109 + 2 < 5 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 6 < 110 + 5 < 8 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 7 < 101 + 2 < 8 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1016,23 +864,23 @@ x < y </Original> <Expanded> - 7 < 102 + 2 < 5 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 7 < 103 + 5 < 9 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 7 < 104 + 2 < 9 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1040,23 +888,23 @@ x < y </Original> <Expanded> - 7 < 105 + 2 < 6 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 7 < 106 + 6 < 7 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 7 < 107 + 2 < 7 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1064,23 +912,23 @@ x < y </Original> <Expanded> - 7 < 108 + 2 < 6 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 7 < 109 + 6 < 8 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 7 < 110 + 2 < 8 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1088,23 +936,23 @@ x < y </Original> <Expanded> - 8 < 101 + 2 < 6 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 8 < 102 + 6 < 9 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 8 < 103 + 2 < 9 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1112,23 +960,23 @@ x < y </Original> <Expanded> - 8 < 104 + 3 < 4 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 8 < 105 + 4 < 7 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 8 < 106 + 3 < 7 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1136,23 +984,23 @@ x < y </Original> <Expanded> - 8 < 107 + 3 < 4 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 8 < 108 + 4 < 8 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 8 < 109 + 3 < 8 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1160,23 +1008,23 @@ x < y </Original> <Expanded> - 8 < 110 + 3 < 4 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 9 < 101 + 4 < 9 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 9 < 102 + 3 < 9 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1184,23 +1032,23 @@ x < y </Original> <Expanded> - 9 < 103 + 3 < 5 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 9 < 104 + 5 < 7 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 9 < 105 + 3 < 7 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1208,23 +1056,23 @@ x < y </Original> <Expanded> - 9 < 106 + 3 < 5 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 9 < 107 + 5 < 8 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 9 < 108 + 3 < 8 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1232,23 +1080,23 @@ x < y </Original> <Expanded> - 9 < 109 + 3 < 5 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 9 < 110 + 5 < 9 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 10 < 101 + 3 < 9 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1256,23 +1104,23 @@ x < y </Original> <Expanded> - 10 < 102 + 3 < 6 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 10 < 103 + 6 < 7 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 10 < 104 + 3 < 7 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1280,23 +1128,23 @@ x < y </Original> <Expanded> - 10 < 105 + 3 < 6 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 10 < 106 + 6 < 8 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 10 < 107 + 3 < 8 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1304,23 +1152,23 @@ x < y </Original> <Expanded> - 10 < 108 + 3 < 6 </Expanded> </Expression> <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + y < z </Original> <Expanded> - 10 < 109 + 6 < 9 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> - x < y + x < z </Original> <Expanded> - 10 < 110 + 3 < 9 </Expanded> </Expression> <OverallResult success="true"/> @@ -3690,381 +3538,419 @@ </Section> <OverallResult success="true"/> </TestCase> - <TestCase name="Generators" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <TestCase name="Generators -- simple" tags="[generators]" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "a" - </Info> - <Info> - j := 8 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + j < i + </Original> + <Expanded> + -3 < 1 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "a" - </Info> - <Info> - j := 9 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + j < i + </Original> + <Expanded> + -2 < 1 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "a" - </Info> - <Info> - j := 10 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + j < i + </Original> + <Expanded> + -1 < 1 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> - <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "a" - </Info> - <Info> - j := 2 - </Info> + <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + 4u * i > str.size() + </Original> + <Expanded> + 4 > 1 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "a" - </Info> - <Info> - j := 3.141 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + 4u * i > str.size() + </Original> + <Expanded> + 4 > 2 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "a" - </Info> - <Info> - j := 1.379 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + 4u * i > str.size() + </Original> + <Expanded> + 4 > 3 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "b" - </Info> - <Info> - j := 8 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + j < i + </Original> + <Expanded> + -3 < 2 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "b" - </Info> - <Info> - j := 9 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + j < i + </Original> + <Expanded> + -2 < 2 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "b" - </Info> - <Info> - j := 10 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + j < i + </Original> + <Expanded> + -1 < 2 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> - <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "b" - </Info> - <Info> - j := 2 - </Info> + <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + 4u * i > str.size() + </Original> + <Expanded> + 8 > 1 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "b" - </Info> - <Info> - j := 3.141 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + 4u * i > str.size() + </Original> + <Expanded> + 8 > 2 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "b" - </Info> - <Info> - j := 1.379 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + 4u * i > str.size() + </Original> + <Expanded> + 8 > 3 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "c" - </Info> - <Info> - j := 8 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + j < i + </Original> + <Expanded> + -3 < 3 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "c" - </Info> - <Info> - j := 9 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + j < i + </Original> + <Expanded> + -2 < 3 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "c" - </Info> - <Info> - j := 10 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + j < i + </Original> + <Expanded> + -1 < 3 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> - <Section name="one" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "c" - </Info> - <Info> - j := 2 - </Info> + <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + 4u * i > str.size() + </Original> + <Expanded> + 12 > 1 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "c" - </Info> - <Info> - j := 3.141 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + 4u * i > str.size() + </Original> + <Expanded> + 12 > 2 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <Section name="two" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > - <Info> - i := "c" - </Info> - <Info> - j := 1.379 - </Info> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + 4u * i > str.size() + </Original> + <Expanded> + 12 > 3 + </Expanded> + </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> </Section> <OverallResult success="true"/> </TestCase> - <TestCase name="Generators impl" tags="[impl]" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Section name="range" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <TestCase name="Generators internals" tags="[generators][internals]" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Section name="Single value" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen.size() == 2 + gen.get() == 123 </Original> <Expanded> - 2 == 2 + 123 == 123 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE_FALSE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[0] == 1 + !(gen.next()) </Original> <Expanded> - 1 == 1 + !false </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <OverallResults successes="2" failures="0" expectedFailures="0"/> + </Section> + <Section name="Preset values" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[1] == 2 + gen.get() == 1 </Original> <Expanded> - 2 == 2 + 1 == 1 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> - </Section> - <Section name="fixed values" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen.size() == 4 + gen.next() </Original> <Expanded> - 4 == 4 + true </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[0] == 3 + gen.get() == 3 </Original> <Expanded> 3 == 3 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[1] == 1 + gen.next() </Original> <Expanded> - 1 == 1 + true </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[2] == 4 + gen.get() == 5 </Original> <Expanded> - 4 == 4 + 5 == 5 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE_FALSE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[3] == 1 + !(gen.next()) </Original> <Expanded> - 1 == 1 + !false </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0"/> </Section> - <Section name="combined" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Section name="Generator combinator" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen.size() == 4 + gen.get() == 1 </Original> <Expanded> - 4 == 4 + 1 == 1 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[0] == 1 + gen.next() </Original> <Expanded> - 1 == 1 + true </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[1] == 2 + gen.get() == 5 </Original> <Expanded> - 2 == 2 + 5 == 5 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[2] == 9 + gen.next() </Original> <Expanded> - 9 == 9 + true </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[3] == 7 + gen.get() == 2 </Original> <Expanded> - 7 == 7 + 2 == 2 </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> - </Section> - <Section name="values" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen.size() == 2 + gen.next() </Original> <Expanded> - 2 == 2 + true </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[0] == 3 + gen.get() == 4 </Original> <Expanded> - 3 == 3 + 4 == 4 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[1] == 1 + gen.next() </Original> <Expanded> - 1 == 1 + true </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> - </Section> - <Section name="values2" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen.size() == 2 + gen.get() == 0 </Original> <Expanded> - 2 == 2 + 0 == 0 </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE_FALSE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[0] == 3 + !(gen.next()) </Original> <Expanded> - 3 == 3 + !false </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <OverallResults successes="10" failures="0" expectedFailures="0"/> + </Section> + <Section name="Explicitly typed generator sequence" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - gen[1] == 1 + gen.get().size() == 2 </Original> <Expanded> - 1 == 1 + 2 == 2 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> - </Section> - <Section name="type erasure" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - base->size() == 4 + gen.get() == "aa" </Original> <Expanded> - 4 == 4 + "aa" == "aa" </Expanded> </Expression> <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - typed + gen.next() </Original> <Expanded> - 0x<hex digits> + true </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - typed->size() == 4 + gen.get() == "bb" </Original> <Expanded> - 4 == 4 + "bb" == "bb" </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - (*typed)[0] == 7 + gen.next() </Original> <Expanded> - 7 == 7 + true </Expanded> </Expression> - <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Original> - (*typed)[3] == 11 + gen.get() == "cc" </Original> <Expanded> - 11 == 11 + "cc" == "cc" </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <Expression success="true" type="REQUIRE_FALSE" filename="projects/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Original> + !(gen.next()) + </Original> + <Expanded> + !false + </Expanded> + </Expression> + <OverallResults successes="7" failures="0" expectedFailures="0"/> </Section> <OverallResult success="true"/> </TestCase> @@ -11180,7 +11066,7 @@ loose text artifact </Expression> <OverallResult success="true"/> </TestCase> - <TestCase name="strlen3" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <TestCase name="strlen3" tags="[generators]" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > <Original> data.str.size() == data.len @@ -11215,6 +11101,41 @@ loose text artifact </Expression> <OverallResult success="true"/> </TestCase> + <TestCase name="tables" tags="[generators]" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + </Original> + <Expanded> + 5 == 5 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + </Original> + <Expanded> + 6 == 6 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + </Original> + <Expanded> + 5 == 5 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + </Original> + <Expanded> + 6 == 6 + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> <TestCase name="thrown std::strings are translated" tags="[!throws][.][failing]" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" > Why would you throw a std::string? @@ -11733,7 +11654,7 @@ loose text artifact </Section> <OverallResult success="true"/> </TestCase> - <OverallResults successes="1126" failures="130" expectedFailures="21"/> + <OverallResults successes="1112" failures="130" expectedFailures="21"/> </Group> - <OverallResults successes="1126" failures="129" expectedFailures="21"/> + <OverallResults successes="1112" failures="129" expectedFailures="21"/> </Catch> diff --git a/projects/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp b/projects/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp index b3074b2e..0473b737 100644 --- a/projects/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp +++ b/projects/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp @@ -1,93 +1,46 @@ #include "catch.hpp" -// Tests of generartor implementation details - -TEST_CASE("Generators impl", "[impl]") { - using namespace Catch::Generators; - - SECTION( "range" ) { - auto gen = range(1,3); - - CHECK( gen.size() == 2 ); - - CHECK( gen[0] == 1 ); - CHECK( gen[1] == 2 ); - } - SECTION( "fixed values" ) { - auto gen = values( { 3, 1, 4, 1 } ); - - CHECK( gen.size() == 4 ); - CHECK( gen[0] == 3 ); - CHECK( gen[1] == 1 ); - CHECK( gen[2] == 4 ); - CHECK( gen[3] == 1 ); - } - SECTION( "combined" ) { - auto gen = makeGenerators( range( 1, 3 ), values( { 9, 7 } ) ); - - CHECK( gen.size() == 4 ); - CHECK( gen[0] == 1 ); - CHECK( gen[1] == 2 ); - CHECK( gen[2] == 9 ); - CHECK( gen[3] == 7 ); - } - - SECTION( "values" ) { - auto gen = makeGenerators( 3, 1 ); - - CHECK( gen.size() == 2 ); - CHECK( gen[0] == 3 ); - CHECK( gen[1] == 1 ); - } - SECTION( "values2" ) { - auto gen = makeGenerators( 3, 1 ); - - CHECK( gen.size() == 2 ); - CHECK( gen[0] == 3 ); - CHECK( gen[1] == 1 ); - } - - - SECTION( "type erasure" ) { - auto gen = makeGenerators( range( 7, 10 ), 11 ); - - // Make type erased version - auto dynCopy = pf::make_unique<Generators<int>>( std::move( gen ) ); - std::unique_ptr<GeneratorBase const> base = std::move( dynCopy ); - - // Only thing we can do is ask for the size - CHECK( base->size() == 4 ); - - // Restore typed version - auto typed = dynamic_cast<Generators<int> const*>( base.get() ); - REQUIRE( typed ); - CHECK( typed->size() == 4 ); - CHECK( (*typed)[0] == 7 ); - CHECK( (*typed)[3] == 11 ); - } -} - -TEST_CASE("Generators impl - random", "[approvals]") { +// Tests of generator implementation details +TEST_CASE("Generators internals", "[generators][internals]") { using namespace Catch::Generators; - SECTION( "random range" ) { - auto gen = random( 3, 9 ); - - CHECK( gen.size() == 6 ); - for( size_t i = 0; i < 6; ++i ) { - CHECK( gen[i] >= 3 ); - CHECK( gen[i] <= 8 ); - if( i > 0 ) - CHECK( gen[i] != gen[i-1] ); - } - } - SECTION( "random selection" ) { - auto gen = random<int>( 10 ); - - CHECK( gen.size() == 10 ); - for( size_t i = 0; i < 10; ++i ) { - if( i > 0 ) - CHECK( gen[i] != gen[i-1] ); - } + SECTION("Single value") { + auto gen = value(123); + REQUIRE(gen.get() == 123); + REQUIRE_FALSE(gen.next()); + } + SECTION("Preset values") { + auto gen = values({ 1, 3, 5 }); + REQUIRE(gen.get() == 1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 3); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 5); + REQUIRE_FALSE(gen.next()); + } + SECTION("Generator combinator") { + auto gen = makeGenerators(1, 5, values({ 2, 4 }), 0); + REQUIRE(gen.get() == 1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 5); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 4); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 0); + REQUIRE_FALSE(gen.next()); + } + SECTION("Explicitly typed generator sequence") { + auto gen = makeGenerators(as<std::string>{}, "aa", "bb", "cc"); + // This just checks that the type is std::string: + REQUIRE(gen.get().size() == 2); + // Iterate over the generator + REQUIRE(gen.get() == "aa"); + REQUIRE(gen.next()); + REQUIRE(gen.get() == "bb"); + REQUIRE(gen.next()); + REQUIRE(gen.get() == "cc"); + REQUIRE_FALSE(gen.next()); } } diff --git a/projects/SelfTest/UsageTests/Generators.tests.cpp b/projects/SelfTest/UsageTests/Generators.tests.cpp index 9242174a..b2a0c4e1 100644 --- a/projects/SelfTest/UsageTests/Generators.tests.cpp +++ b/projects/SelfTest/UsageTests/Generators.tests.cpp @@ -1,53 +1,58 @@ #include "catch.hpp" -// Examples of usage of Generators +#include <cstring> -// This test doesn't do much - it just shows how you can have several generators, of different -// types (ie `i` and `j` are different types), can be sequenced using `,` and -// can be expressed as named generators (like range) or as individual values. -// Generators can be mixed with SECTIONs. -// At time of writing the generated values are not automatically reported as part of the test -// name or associated values - so we explicitly CAPTURE then (run this with `-s` to see them). -// We could also incorporate them into the section names using DYNAMIC_SECTION. See the BDD -// example later for more information. -TEST_CASE("Generators") { - auto i = GENERATE( as<std::string>(), "a", "b", "c" ); - - SECTION( "one" ) { - auto j = GENERATE( range( 8, 11 ), 2 ); - - CAPTURE( i, j ); - SUCCEED(); +// Generators and sections can be nested freely +TEST_CASE("Generators -- simple", "[generators]") { + auto i = GENERATE(1, 2, 3); + SECTION("one") { + auto j = GENERATE(values({ -3, -2, -1 })); + REQUIRE(j < i); } - SECTION( "two" ) { - auto j = GENERATE( 3.141, 1.379 ); - CAPTURE( i, j ); - SUCCEED(); + + SECTION("two") { + // You can also explicitly set type for generators via Catch::Generators::as + auto str = GENERATE(as<std::string>{}, "a", "bb", "ccc"); + REQUIRE(4u * i > str.size()); } } -// This one generates the cross-product of two ranges. -// It's mostly here to demonstrate the performance which, at time of writing, -// leaves a lot to be desired. -TEST_CASE( "100x100 ints", "[.][approvals]" ) { - auto x = GENERATE( range( 0,100 ) ); - auto y = GENERATE( range( 200,300 ) ); - - CHECK( x < y ); +// You can create a cartesian-product of generators by creating multiple ones +TEST_CASE("3x3x3 ints", "[generators]") { + auto x = GENERATE(1, 2, 3); + auto y = GENERATE(4, 5, 6); + auto z = GENERATE(7, 8, 9); + // These assertions will be run 27 times (3x3x3) + CHECK(x < y); + CHECK(y < z); + REQUIRE(x < z); } -// smaller version -TEST_CASE( "10x10 ints" ) { - auto x = GENERATE( range( 1,11 ) ); - auto y = GENERATE( range( 101, 111 ) ); - - CHECK( x < y ); +// You can also create data tuples +TEST_CASE("tables", "[generators]") { + // Note that this will not compile with libstdc++ older than libstdc++6 + // See https://stackoverflow.com/questions/12436586/tuple-vector-and-initializer-list + // for possible workarounds + // auto data = GENERATE(table<char const*, int>({ + // {"first", 5}, + // {"second", 6}, + // {"third", 5}, + // {"etc...", 6} + // })); + + // Workaround for the libstdc++ bug mentioned above + using tuple_type = std::tuple<char const*, int>; + auto data = GENERATE(table<char const*, int>({ + tuple_type{"first", 5}, + tuple_type{"second", 6}, + tuple_type{"third", 5}, + tuple_type{"etc...", 6} + })); + + REQUIRE(strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data))); } -// Some of the following tests use structured bindings for convenience and so are -// conditionally compiled using the de-facto (and soon to be formally) standard -// feature macros #ifdef __cpp_structured_bindings @@ -56,7 +61,7 @@ TEST_CASE( "10x10 ints" ) { // but it demonstrates a possible usage. // Spelling out the pair like this is a bit verbose, so read on for better examples // - the use of structured bindings here is an optional convenience -TEST_CASE( "strlen", "[approvals]" ) { +TEST_CASE( "strlen", "[approvals][generators]" ) { auto [test_input, expected] = GENERATE( values<std::pair<std::string_view, size_t>>({ {"one", 3}, {"two", 3}, @@ -69,7 +74,7 @@ TEST_CASE( "strlen", "[approvals]" ) { // A nicer way to do pairs (or more) of values - using the table generator. // Note, you must specify the types up-front. -TEST_CASE( "strlen2", "[approvals]" ) { +TEST_CASE( "strlen2", "[approvals][generators]" ) { auto [test_input, expected] = GENERATE( table<std::string, size_t>({ {"one", 3}, {"two", 3}, @@ -81,11 +86,11 @@ TEST_CASE( "strlen2", "[approvals]" ) { } #endif -// An alternate way of doing data tables without structure bindings -// - I'd prefer to have the Data class within the test case but gcc 4.x doesn't seem to like it + +// An alternate way of doing data tables without structured bindings struct Data { std::string str; size_t len; }; -TEST_CASE( "strlen3" ) { +TEST_CASE( "strlen3", "[generators]" ) { auto data = GENERATE( values<Data>({ {"one", 3}, {"two", 3}, @@ -96,15 +101,7 @@ TEST_CASE( "strlen3" ) { REQUIRE( data.str.size() == data.len ); } -// A nod towards property-based testing - generate a random selection of numbers -// in a range and assert on global properties those numbers. -static auto square( int i ) -> int { return i*i; } -TEST_CASE( "Random numbers in a range", "[.][approvals]" ) { - auto x = GENERATE( random( -10000, 10000 ) ); - CAPTURE( x ); - REQUIRE( square(x) >= 0 ); -} #ifdef __cpp_structured_bindings @@ -118,7 +115,7 @@ TEST_CASE( "Random numbers in a range", "[.][approvals]" ) { static auto eatCucumbers( int start, int eat ) -> int { return start-eat; } -SCENARIO("Eating cucumbers", "[approvals]") { +SCENARIO("Eating cucumbers", "[generators][approvals]") { auto [start, eat, left] = GENERATE( table<int,int,int> ({ { 12, 5, 7 },