diff --git a/LICENSE_1_0.txt b/LICENSE_1_0.txt
index 1dad8e93..36b7cd93 100644
--- a/LICENSE_1_0.txt
+++ b/LICENSE_1_0.txt
@@ -1,23 +1,23 @@
-Boost Software License - Version 1.0 - August 17th, 2003
-
-Permission is hereby granted, free of charge, to any person or organization
-obtaining a copy of the software and accompanying documentation covered by
-this license (the "Software") to use, reproduce, display, distribute,
-execute, and transmit the Software, and to prepare derivative works of the
-Software, and to permit third-parties to whom the Software is furnished to
-do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including
-the above license grant, this restriction and the following disclaimer,
-must be included in all copies of the Software, in whole or in part, and
-all derivative works of the Software, unless such copies or derivative
-works are solely in the form of machine-executable object code generated by
-a source language processor.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
index 5efeaddd..4d5f7507 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
![catch logo](catch-logo-small.png)
-*v1.0 build 11 (master branch)*
+*v1.0 build 14 (master branch)*
Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)
diff --git a/docs/build-systems.md b/docs/build-systems.md
new file mode 100644
index 00000000..a0aed10a
--- /dev/null
+++ b/docs/build-systems.md
@@ -0,0 +1,36 @@
+# Integration with build systems
+
+## CMake
+
+You can use the following CMake script to automatically fetch Catch from github and configure it as an external project:
+
+```CMake
+cmake_minimum_required(VERSION 2.8.8)
+project(catch_builder CXX)
+include(ExternalProject)
+
+ExternalProject_Add(
+ catch
+ PREFIX ${CMAKE_BINARY_DIR}/catch
+ GIT_REPOSITORY https://github.com/philsquared/Catch.git
+ TIMEOUT 10
+ UPDATE_COMMAND ${GIT_EXECUTABLE} pull
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ LOG_DOWNLOAD ON
+ )
+
+# Expose required variable (CATCH_INCLUDE_DIR) to parent scope
+ExternalProject_Get_Property(catch source_dir)
+set(CATCH_INCLUDE_DIR ${source_dir}/include CACHE INTERNAL "Path to include folder for Catch")
+```
+
+If you put it in, e.g., `${PROJECT_SRC_DIR}/${EXT_PROJECTS_DIR}/catch/`, you can use it in your project by adding the following to your root CMake file:
+
+```CMake
+# Includes Catch in the project:
+add_subdirectory(${EXT_PROJECTS_DIR}/catch)
+include_directories(${CATCH_INCLUDE_DIR} ${COMMON_INCLUDES})
+enable_testing(true) # Enables unit-testing.
+```
\ No newline at end of file
diff --git a/docs/command-line.md b/docs/command-line.md
index b94dc86f..915286c8 100644
--- a/docs/command-line.md
+++ b/docs/command-line.md
@@ -21,7 +21,7 @@ Note that options are described according to the following pattern:
Test cases, wildcarded test cases, tags and tag expressions are all passed directly as arguments. Tags are distinguished by being enclosed in square brackets.
-If no test specs are supplied then all test cases, except "hidden" tests (tagged ```[hide]``` or, in the legacy case, prefixed by `'./'`) are run
+If no test specs are supplied then all test cases, except "hidden" tests (tagged ```[hide]```, ```[.]``` or, in the legacy case, prefixed by `'./'`) are run.
Specs must be enclosed in quotes if they contain spaces. If they do not contain spaces the quotes are optional.
diff --git a/docs/test-cases-and-sections.md b/docs/test-cases-and-sections.md
index 4fc3f6f8..863d5faf 100644
--- a/docs/test-cases-and-sections.md
+++ b/docs/test-cases-and-sections.md
@@ -15,7 +15,22 @@ For examples see the [Tutorial](tutorial.md)
## Tags
--{placeholder for documentation of tags}-
+Tags allow an arbitrary number of additional strings to be associated with a test case. Test cases can be selected (for running, or just for listing) by tag - or even by an expression that combines several tags. At their most basic level they provide a simple way to group several related tests together.
+
+As an example - given the following test cases:
+
+ TEST_CASE( "A", "[widget]" ) { /* ... */ }
+ TEST_CASE( "B", "[widget]" ) { /* ... */ }
+ TEST_CASE( "C", "[gadget]" ) { /* ... */ }
+ TEST_CASE( "D", "[widget][gadget]" ) { /* ... */ }
+
+The tag expression, ```"[widget]"``` selects A, B & D. ```"[gadget]"``` selects C & D. ```"[widget][gadget]"``` selects just D and ```"[widget],[gadget]"``` selects all four test cases.
+
+For more detail on command line selection see [the command line docs](command-line.md#specifying-which-tests-to-run)
+
+A special tag name, ```[hide]``` causes test cases to be skipped from the default list (ie when no test cases have been explicitly selected through tag expressions or name wildcards). ```[.]``` is an alias for ```[hide]```.
+
+Tag names are not case sensitive.
## BDD-style test cases
diff --git a/docs/tutorial.md b/docs/tutorial.md
index 12f838d9..2d75dab0 100644
--- a/docs/tutorial.md
+++ b/docs/tutorial.md
@@ -87,11 +87,11 @@ Of course there are still more issues to do deal with. For example we'll hit pro
Although this was a simple test it's been enough to demonstrate a few things about how Catch is used. Let's take moment to consider those before we move on.
1. All we did was ```#define``` one identifier and ```#include``` one header and we got everything - even an implementation of ```main()``` that will [respond to command line arguments](command-line.md). You can only use that ```#define``` in one implementation file, for (hopefully) obvious reasons. Once you have more than one file with unit tests in you'll just ```#include "catch.hpp"``` and go. Usually it's a good idea to have a dedicated implementation file that just has ```#define CATCH_CONFIG_MAIN``` and ```#include "catch.hpp"```. You can also provide your own implementation of main and drive Catch yourself (see [Supplying-your-own-main()](own-main.md).
-2. We introduce test cases with the TEST_CASE macro. This macro takes one or two arguments - a free form test name and, optionally, one or more tags (for more see Test cases and Sections, below. The test name must be unique. You can run sets of tests by specifying a wildcarded test name or a tag expression. See the [command line docs](command-line.md) for more information on running tests.
+2. We introduce test cases with the TEST_CASE macro. This macro takes one or two arguments - a free form test name and, optionally, one or more tags (for more see Test cases and Sections, below. The test name must be unique. You can run sets of tests by specifying a wildcarded test name or a tag expression. See the [command line docs](command-line.md) for more information on running tests.
3. The name and tags arguments are just strings. We haven't had to declare a function or method - or explicitly register the test case anywhere. Behind the scenes a function with a generated name is defined for you, and automatically registered using static registry classes. By abstracting the function name away we can name our tests without the constraints of identifier names.
4. We write our individual test assertions using the REQUIRE macro. Rather than a separate macro for each type of condition we express the condition naturally using C/C++ syntax. Behind the scenes a simple set of expression templates captures the left-hand-side and right-hand-side of the expression so we can display the values in our test report. As we'll see later there _are_ other assertion macros - but because of this technique the number of them is drastically reduced.
-
+
## Test cases and sections
Most test frameworks have a class-based fixture mechanism. That is, test cases map to methods on a class and common setup and teardown can be performed in ```setup()``` and ```teardown()``` methods (or constructor/ destructor in languages, like C++, that support deterministic destruction).
@@ -140,7 +140,82 @@ This works because the ```SECTION``` macro contains an if statement that calls b
So far so good - this is already an improvement on the setup/ teardown approach because now we see our setup code inline and we can use the stack.
--{placeholder for documentation on nested sections}-
+The power of sections really shows, however, when we need to execute a sequence of, checked, operations. Continuing the vector example we might want to verify that after reserving a larger capacity, if we reserve smaller capacity (but still larger than the current size) then the capacity is not, in fact, changed. We can do that, naturally, like so:
+
+ SECTION( "reserving bigger changes capacity but not size" ) {
+ v.reserve( 10 );
+
+ REQUIRE( v.size() == 5 );
+ REQUIRE( v.capacity() >= 10 );
+
+ SECTION( "reserving smaller again does not change capacity" ) {
+ v.reserve( 7 );
+
+ REQUIRE( v.capacity() >= 10 );
+ }
+ }
+
+Sections can be nested to an arbitrary depth (limited only by your stack size). Each leaf section (i.e. a section that contains no nested sections) will be executed exactly once, on a separate path of execution from any other leaf section (so no leaf section can interfere with another). Obviously a failure in a parent section will prevent nested sections from running - but that's the idea.
+
+## BDD-Style
+
+If you name your test cases and sections appropriately you can achieve a BDD-style specification structure. This became such a useful way of working that first class support has been added to Catch. Scenarios can be specified using ```SCENARIO```, ```GIVEN```, ```WHEN``` and ```THEN``` macros, which map on to ```TEST_CASE```s and ```SECTION```s, respectively (for more details see [Test cases and sections](test-cases-and-sections.md)).
+
+The vector example can be adjusted to use these macros like so:
+
+```c++
+SCENARIO( "vectors can be sized and resized", "[vector]" ) {
+
+ GIVEN( "A vector with some items" ) {
+ std::vector v( 5 );
+
+ REQUIRE( v.size() == 5 );
+ REQUIRE( v.capacity() >= 5 );
+
+ WHEN( "the size is increased" ) {
+ v.resize( 10 );
+
+ THEN( "the size and capacity change" ) {
+ REQUIRE( v.size() == 10 );
+ REQUIRE( v.capacity() >= 10 );
+ }
+ }
+ WHEN( "the size is reduced" ) {
+ v.resize( 0 );
+
+ THEN( "the size changes but not capacity" ) {
+ REQUIRE( v.size() == 0 );
+ REQUIRE( v.capacity() >= 5 );
+ }
+ }
+ WHEN( "more capacity is reserved" ) {
+ v.reserve( 10 );
+
+ THEN( "the capacity changes but not the size" ) {
+ REQUIRE( v.size() == 5 );
+ REQUIRE( v.capacity() >= 10 );
+ }
+ }
+ WHEN( "less capacity is reserved" ) {
+ v.reserve( 0 );
+
+ THEN( "neither size nor capacity are changed" ) {
+ REQUIRE( v.size() == 5 );
+ REQUIRE( v.capacity() >= 5 );
+ }
+ }
+ }
+}
+```
+
+A nice consequence of this is that when these tests are run the test names are reported like this:
+
+```
+Scenario: vectors can be sized and resized
+ Given: A vector with some items
+ When: more capacity is reserved
+ Then: the capacity changes but not the size
+```
## Next steps
For more specific information see the [Reference pages](reference-index.md)
diff --git a/include/internal/catch_commandline.hpp b/include/internal/catch_commandline.hpp
index 3b32f2b2..5b80761f 100644
--- a/include/internal/catch_commandline.hpp
+++ b/include/internal/catch_commandline.hpp
@@ -12,6 +12,8 @@
#include "catch_common.h"
#include "clara.h"
+#include
+
namespace Catch {
inline void abortAfterFirst( ConfigData& config ) { config.abortAfter = 1; }
@@ -38,7 +40,18 @@ namespace Catch {
? ShowDurations::Always
: ShowDurations::Never;
}
-
+ inline void loadTestNamesFromFile( ConfigData& config, std::string const& _filename ) {
+ std::ifstream f( _filename.c_str() );
+ if( !f.is_open() )
+ throw std::domain_error( "Unable to load input file: " + _filename );
+
+ std::string line;
+ while( std::getline( f, line ) ) {
+ line = trim(line);
+ if( !line.empty() && !startsWith( line, "#" ) )
+ addTestOrTags( config, line );
+ }
+ }
inline Clara::CommandLine makeCommandLineParser() {
@@ -53,19 +66,15 @@ namespace Catch {
.longOpt( "help" );
cli.bind( &ConfigData::listTests )
- .describe( "list all (or matching) test cases" )
+ .describe( "list all/matching test cases" )
.shortOpt( "l")
.longOpt( "list-tests" );
cli.bind( &ConfigData::listTags )
- .describe( "list all (or matching) tags" )
+ .describe( "list all/matching tags" )
.shortOpt( "t")
.longOpt( "list-tags" );
- cli.bind( &ConfigData::listReporters )
- .describe( "list all reporters" )
- .longOpt( "list-reporters" );
-
cli.bind( &ConfigData::showSuccessfulTests )
.describe( "include successful tests in output" )
.shortOpt( "s")
@@ -88,7 +97,7 @@ namespace Catch {
.hint( "filename" );
cli.bind( &ConfigData::reporterName )
- .describe( "reporter to use - defaults to console" )
+ .describe( "reporter to use (defaults to console)" )
.shortOpt( "r")
.longOpt( "reporter" )
// .hint( "name[:filename]" );
@@ -133,6 +142,22 @@ namespace Catch {
.longOpt( "durations" )
.hint( "yes/no" );
+ cli.bind( &loadTestNamesFromFile )
+ .describe( "load test names to run from a file" )
+ .shortOpt( "f")
+ .longOpt( "input-file" )
+ .hint( "filename" );
+
+ // Less common commands which don't have a short form
+ cli.bind( &ConfigData::listTestNamesOnly )
+ .describe( "list all/matching test cases names only" )
+ .longOpt( "list-test-names-only" );
+
+ cli.bind( &ConfigData::listReporters )
+ .describe( "list all reporters" )
+ .longOpt( "list-reporters" );
+
+
return cli;
}
diff --git a/include/internal/catch_config.hpp b/include/internal/catch_config.hpp
index f561b260..51b5913a 100644
--- a/include/internal/catch_config.hpp
+++ b/include/internal/catch_config.hpp
@@ -30,6 +30,7 @@ namespace Catch {
: listTests( false ),
listTags( false ),
listReporters( false ),
+ listTestNamesOnly( false ),
showSuccessfulTests( false ),
shouldDebugBreak( false ),
noThrow( false ),
@@ -43,6 +44,7 @@ namespace Catch {
bool listTests;
bool listTags;
bool listReporters;
+ bool listTestNamesOnly;
bool showSuccessfulTests;
bool shouldDebugBreak;
@@ -112,6 +114,7 @@ namespace Catch {
}
bool listTests() const { return m_data.listTests; }
+ bool listTestNamesOnly() const { return m_data.listTestNamesOnly; }
bool listTags() const { return m_data.listTags; }
bool listReporters() const { return m_data.listReporters; }
diff --git a/include/internal/catch_console_colour_impl.hpp b/include/internal/catch_console_colour_impl.hpp
index 0183f785..b20762f3 100644
--- a/include/internal/catch_console_colour_impl.hpp
+++ b/include/internal/catch_console_colour_impl.hpp
@@ -117,7 +117,7 @@ namespace {
};
inline bool shouldUseColourForPlatform() {
- return isatty( fileno(stdout) );
+ return isatty(STDOUT_FILENO);
}
PosixColourImpl platformColourImpl;
diff --git a/include/internal/catch_list.hpp b/include/internal/catch_list.hpp
index 45807edd..70d7668c 100644
--- a/include/internal/catch_list.hpp
+++ b/include/internal/catch_list.hpp
@@ -30,76 +30,29 @@ namespace Catch {
std::cout << "All available test cases:\n";
else
std::cout << "Matching test cases:\n";
- std::vector const& allTests = getRegistryHub().getTestCaseRegistry().getAllTests();
- std::vector::const_iterator it = allTests.begin(), itEnd = allTests.end();
-
- // First pass - get max tags
- std::size_t maxTagLen = 0;
- std::size_t maxNameLen = 0;
- for(; it != itEnd; ++it ) {
- if( matchesFilters( config.filters(), *it ) ) {
- maxTagLen = (std::max)( it->getTestCaseInfo().tagsAsString.size(), maxTagLen );
- maxNameLen = (std::max)( it->getTestCaseInfo().name.size(), maxNameLen );
- }
- }
-
- // Try to fit everything in. If not shrink tag column first, down to 30
- // then shrink name column until it all fits (strings will be wrapped within column)
- while( maxTagLen + maxNameLen > CATCH_CONFIG_CONSOLE_WIDTH-5 ) {
- if( maxTagLen > 30 )
- --maxTagLen;
- else
- --maxNameLen;
- }
std::size_t matchedTests = 0;
- for( it = allTests.begin(); it != itEnd; ++it ) {
+ TextAttributes nameAttr, tagsAttr;
+ nameAttr.setInitialIndent( 2 ).setIndent( 4 );
+ tagsAttr.setIndent( 6 );
+
+ std::vector const& allTests = getRegistryHub().getTestCaseRegistry().getAllTests();
+ for( std::vector::const_iterator it = allTests.begin(), itEnd = allTests.end();
+ it != itEnd;
+ ++it )
if( matchesFilters( config.filters(), *it ) ) {
matchedTests++;
- Text nameWrapper( it->getTestCaseInfo().name,
- TextAttributes()
- .setWidth( maxNameLen+2 )
- .setInitialIndent(2)
- .setIndent(4) );
+ TestCaseInfo const& testCaseInfo = it->getTestCaseInfo();
+ Colour::Code colour = testCaseInfo.isHidden
+ ? Colour::SecondaryText
+ : Colour::None;
+ Colour colourGuard( colour );
- Text tagsWrapper( it->getTestCaseInfo().tagsAsString,
- TextAttributes()
- .setWidth( maxTagLen )
- .setInitialIndent(0)
- .setIndent( 2 ) );
-
- for( std::size_t i = 0; i < (std::max)( nameWrapper.size(), tagsWrapper.size() ); ++i ) {
- Colour::Code colour = Colour::None;
- if( it->getTestCaseInfo().isHidden )
- colour = Colour::SecondaryText;
- std::string nameCol;
- if( i < nameWrapper.size() ) {
- nameCol = nameWrapper[i];
- }
- else {
- nameCol = " ...";
- colour = Colour::SecondaryText;
- }
-
- {
- Colour colourGuard( colour );
- std::cout << nameCol;
- }
- if( i < tagsWrapper.size() && !tagsWrapper[i].empty() ) {
- size_t padLen( maxNameLen > nameCol.size() ? maxNameLen - nameCol.size() : 0 );
- if( i == 0 ) {
- Colour colourGuard( Colour::SecondaryText );
- std::cout << " " << std::string( padLen, '.' ) << " ";
- }
- else {
- std::cout << std::string( padLen, ' ' ) << " ";
- }
- std::cout << tagsWrapper[i];
- }
- std::cout << "\n";
- }
+ std::cout << Text( testCaseInfo.name, nameAttr ) << std::endl;
+ if( !testCaseInfo.tags.empty() )
+ std::cout << Text( testCaseInfo.tagsAsString, tagsAttr ) << std::endl;
}
- }
+
if( config.filters().empty() )
std::cout << pluralise( matchedTests, "test case" ) << "\n" << std::endl;
else
@@ -107,26 +60,39 @@ namespace Catch {
return matchedTests;
}
+ inline std::size_t listTestsNamesOnly( Config const& config ) {
+ std::size_t matchedTests = 0;
+ std::vector const& allTests = getRegistryHub().getTestCaseRegistry().getAllTests();
+ for( std::vector::const_iterator it = allTests.begin(), itEnd = allTests.end();
+ it != itEnd;
+ ++it )
+ if( matchesFilters( config.filters(), *it ) ) {
+ matchedTests++;
+ TestCaseInfo const& testCaseInfo = it->getTestCaseInfo();
+ std::cout << testCaseInfo.name << std::endl;
+ }
+ return matchedTests;
+ }
+
inline std::size_t listTags( Config const& config ) {
if( config.filters().empty() )
std::cout << "All available tags:\n";
else
std::cout << "Matching tags:\n";
- std::vector const& allTests = getRegistryHub().getTestCaseRegistry().getAllTests();
- std::vector::const_iterator it = allTests.begin(), itEnd = allTests.end();
std::map tagCounts;
- std::size_t maxTagLen = 0;
-
- for(; it != itEnd; ++it ) {
+ std::vector const& allTests = getRegistryHub().getTestCaseRegistry().getAllTests();
+ for( std::vector::const_iterator it = allTests.begin(),
+ itEnd = allTests.end();
+ it != itEnd;
+ ++it ) {
if( matchesFilters( config.filters(), *it ) ) {
for( std::set::const_iterator tagIt = it->getTestCaseInfo().tags.begin(),
tagItEnd = it->getTestCaseInfo().tags.end();
tagIt != tagItEnd;
++tagIt ) {
std::string tagName = *tagIt;
- maxTagLen = (std::max)( maxTagLen, tagName.size() );
std::map::iterator countIt = tagCounts.find( tagName );
if( countIt == tagCounts.end() )
tagCounts.insert( std::make_pair( tagName, 1 ) );
@@ -135,26 +101,18 @@ namespace Catch {
}
}
}
- maxTagLen +=4;
- if( maxTagLen > CATCH_CONFIG_CONSOLE_WIDTH-10 )
- maxTagLen = CATCH_CONFIG_CONSOLE_WIDTH-10;
- for( std::map::const_iterator countIt = tagCounts.begin(), countItEnd = tagCounts.end();
+ for( std::map::const_iterator countIt = tagCounts.begin(),
+ countItEnd = tagCounts.end();
countIt != countItEnd;
++countIt ) {
+ std::ostringstream oss;
+ oss << " " << countIt->second << " ";
Text wrapper( "[" + countIt->first + "]", TextAttributes()
- .setIndent(2)
- .setWidth( maxTagLen ) );
- std::cout << wrapper;
- std::size_t dots = 2;
- if( maxTagLen > wrapper.last().size() )
- dots += maxTagLen - wrapper.last().size();
- {
- Colour colourGuard( Colour::SecondaryText );
- std::cout << std::string( dots, '.' );
- }
- std::cout << countIt->second
- << "\n";
+ .setInitialIndent( 0 )
+ .setIndent( oss.str().size() )
+ .setWidth( CATCH_CONFIG_CONSOLE_WIDTH-10 ) );
+ std::cout << oss.str() << wrapper << "\n";
}
std::cout << pluralise( tagCounts.size(), "tag" ) << "\n" << std::endl;
return tagCounts.size();
@@ -187,6 +145,8 @@ namespace Catch {
Option listedCount;
if( config.listTests() )
listedCount = listedCount.valueOr(0) + listTests( config );
+ if( config.listTestNamesOnly() )
+ listedCount = listedCount.valueOr(0) + listTestsNamesOnly( config );
if( config.listTags() )
listedCount = listedCount.valueOr(0) + listTags( config );
if( config.listReporters() )
diff --git a/include/internal/catch_test_case_info.hpp b/include/internal/catch_test_case_info.hpp
index 3a279602..59fc39f4 100644
--- a/include/internal/catch_test_case_info.hpp
+++ b/include/internal/catch_test_case_info.hpp
@@ -22,7 +22,7 @@ namespace Catch {
SourceLineInfo const& _lineInfo )
{
std::string desc = _descOrTags;
- bool isHidden( startsWith( _name, "./" ) );
+ bool isHidden( startsWith( _name, "./" ) ); // Legacy support
std::set tags;
TagExtracter( tags ).parse( desc );
if( tags.find( "hide" ) != tags.end() || tags.find( "." ) != tags.end() )
diff --git a/include/internal/catch_test_case_registry_impl.hpp b/include/internal/catch_test_case_registry_impl.hpp
index 41714bc8..af1ee29f 100644
--- a/include/internal/catch_test_case_registry_impl.hpp
+++ b/include/internal/catch_test_case_registry_impl.hpp
@@ -42,8 +42,8 @@ namespace Catch {
else {
TestCase const& prev = *m_functions.find( testCase );
std::cerr << "error: TEST_CASE( \"" << name << "\" ) already defined.\n"
- << "\tFirst seen at " << SourceLineInfo( prev.getTestCaseInfo().lineInfo ) << "\n"
- << "\tRedefined at " << SourceLineInfo( testCase.getTestCaseInfo().lineInfo ) << std::endl;
+ << "\tFirst seen at " << prev.getTestCaseInfo().lineInfo << "\n"
+ << "\tRedefined at " << testCase.getTestCaseInfo().lineInfo << std::endl;
exit(1);
}
}
diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp
index 4b021717..466a9a43 100644
--- a/include/internal/catch_version.hpp
+++ b/include/internal/catch_version.hpp
@@ -13,7 +13,7 @@
namespace Catch {
// These numbers are maintained by a script
- Version libraryVersion( 1, 0, 11, "master" );
+ Version libraryVersion( 1, 0, 14, "master" );
}
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
diff --git a/include/internal/clara.h b/include/internal/clara.h
index fa58da79..b25778fc 100644
--- a/include/internal/clara.h
+++ b/include/internal/clara.h
@@ -155,6 +155,10 @@ namespace Clara {
void (*function)( C& );
};
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable: 4702)
+#endif
template
struct BoundBinaryFunction : IArgFunction{
BoundBinaryFunction( void (*_function)( C&, T ) ) : function( _function ) {}
@@ -172,6 +176,9 @@ namespace Clara {
virtual IArgFunction* clone() const { return new BoundBinaryFunction( *this ); }
void (*function)( C&, T );
};
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
template
BoundArgFunction makeBoundField( M C::* _member ) {
@@ -305,6 +312,13 @@ namespace Clara {
int position;
};
+ // NOTE: std::auto_ptr is deprecated in c++11/c++0x
+#if defined(__cplusplus) && __cplusplus > 199711L
+ typedef std::unique_ptr ArgAutoPtr;
+#else
+ typedef std::auto_ptr ArgAutoPtr;
+#endif
+
class ArgBinder {
public:
template
@@ -329,7 +343,7 @@ namespace Clara {
else if( m_arg.isAnyPositional() ) {
if( m_cl->m_arg.get() )
throw std::logic_error( "Only one unpositional argument can be added" );
- m_cl->m_arg = std::auto_ptr( new Arg( m_arg ) );
+ m_cl->m_arg = ArgAutoPtr( new Arg( m_arg ) );
}
else
m_cl->m_options.push_back( m_arg );
@@ -373,7 +387,7 @@ namespace Clara {
m_highestSpecifiedArgPosition( other.m_highestSpecifiedArgPosition )
{
if( other.m_arg.get() )
- m_arg = std::auto_ptr( new Arg( *other.m_arg ) );
+ m_arg = ArgAutoPtr( new Arg( *other.m_arg ) );
}
template
@@ -543,7 +557,7 @@ namespace Clara {
Detail::BoundArgFunction m_boundProcessName;
std::vector m_options;
std::map m_positionalArgs;
- std::auto_ptr m_arg;
+ ArgAutoPtr m_arg;
int m_highestSpecifiedArgPosition;
};
diff --git a/include/reporters/catch_reporter_console.hpp b/include/reporters/catch_reporter_console.hpp
index 816f4214..17b07a7f 100644
--- a/include/reporters/catch_reporter_console.hpp
+++ b/include/reporters/catch_reporter_console.hpp
@@ -41,13 +41,18 @@ namespace Catch {
virtual bool assertionEnded( AssertionStats const& _assertionStats ) {
AssertionResult const& result = _assertionStats.assertionResult;
+ bool printInfoMessages = true;
+
// Drop out if result was successful and we're not printing those
- if( !m_config->includeSuccessfulResults() && result.isOk() )
- return false;
+ if( !m_config->includeSuccessfulResults() && result.isOk() ) {
+ if( result.getResultType() != ResultWas::Warning )
+ return false;
+ printInfoMessages = false;
+ }
lazyPrint();
- AssertionPrinter printer( stream, _assertionStats );
+ AssertionPrinter printer( stream, _assertionStats, printInfoMessages );
printer.print();
stream << std::endl;
return true;
@@ -105,13 +110,14 @@ namespace Catch {
class AssertionPrinter {
void operator= ( AssertionPrinter const& );
public:
- AssertionPrinter( std::ostream& _stream, AssertionStats const& _stats )
+ AssertionPrinter( std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages )
: stream( _stream ),
stats( _stats ),
result( _stats.assertionResult ),
colour( Colour::None ),
message( result.getMessage() ),
- messages( _stats.infoMessages )
+ messages( _stats.infoMessages ),
+ printInfoMessages( _printInfoMessages )
{
switch( result.getResultType() ) {
case ResultWas::Ok:
@@ -214,7 +220,9 @@ namespace Catch {
for( std::vector::const_iterator it = messages.begin(), itEnd = messages.end();
it != itEnd;
++it ) {
- stream << Text( it->message, TextAttributes().setIndent(2) ) << "\n";
+ // If this assertion is a warning ignore any INFO messages
+ if( printInfoMessages || it->type != ResultWas::Info )
+ stream << Text( it->message, TextAttributes().setIndent(2) ) << "\n";
}
}
void printSourceInfo() const {
@@ -230,6 +238,7 @@ namespace Catch {
std::string messageLabel;
std::string message;
std::vector messages;
+ bool printInfoMessages;
};
void lazyPrint() {
@@ -315,9 +324,14 @@ namespace Catch {
}
void printTotals( const Totals& totals ) {
- if( totals.assertions.total() == 0 ) {
+ if( totals.testCases.total() == 0 ) {
stream << "No tests ran";
}
+ else if( totals.assertions.total() == 0 ) {
+ Colour colour( Colour::Yellow );
+ printCounts( "test case", totals.testCases );
+ stream << " (no assertions)";
+ }
else if( totals.assertions.failed ) {
Colour colour( Colour::ResultError );
printCounts( "test case", totals.testCases );
diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt
index dc1c8357..f796f157 100644
--- a/projects/CMake/CMakeLists.txt
+++ b/projects/CMake/CMakeLists.txt
@@ -122,8 +122,6 @@ CheckFileList(CATCH_SINGLE_INCLUDE "single_include")
set(TEST_SOURCES
"${SELF_TEST_DIR}/ApproxTests.cpp"
"${SELF_TEST_DIR}/BDDTests.cpp"
- "${SELF_TEST_DIR}/catch_self_test.cpp"
- "${SELF_TEST_DIR}/catch_self_test.hpp"
"${SELF_TEST_DIR}/ClassTests.cpp"
"${SELF_TEST_DIR}/CmdLineTests.cpp"
"${SELF_TEST_DIR}/ConditionTests.cpp"
diff --git a/projects/SelfTest/ApproxTests.cpp b/projects/SelfTest/ApproxTests.cpp
index acf96c99..1df76155 100644
--- a/projects/SelfTest/ApproxTests.cpp
+++ b/projects/SelfTest/ApproxTests.cpp
@@ -11,8 +11,8 @@
///////////////////////////////////////////////////////////////////////////////
TEST_CASE
(
- "./succeeding/Approx/simple",
- "Some simple comparisons between doubles"
+ "Some simple comparisons between doubles",
+ "[Approx]"
)
{
double d = 1.23;
@@ -29,8 +29,8 @@ TEST_CASE
///////////////////////////////////////////////////////////////////////////////
TEST_CASE
(
- "./succeeding/Approx/epsilon",
- "Approximate comparisons with different epsilons"
+ "Approximate comparisons with different epsilons",
+ "[Approx]"
)
{
double d = 1.23;
@@ -42,8 +42,8 @@ TEST_CASE
///////////////////////////////////////////////////////////////////////////////
TEST_CASE
(
- "./succeeding/Approx/float",
- "Approximate comparisons with floats"
+ "Approximate comparisons with floats",
+ "[Approx]"
)
{
REQUIRE( 1.23f == Approx( 1.23f ) );
@@ -53,8 +53,8 @@ TEST_CASE
///////////////////////////////////////////////////////////////////////////////
TEST_CASE
(
- "./succeeding/Approx/int",
- "Approximate comparisons with ints"
+ "Approximate comparisons with ints",
+ "[Approx]"
)
{
REQUIRE( 1 == Approx( 1 ) );
@@ -64,8 +64,8 @@ TEST_CASE
///////////////////////////////////////////////////////////////////////////////
TEST_CASE
(
- "./succeeding/Approx/mixed",
- "Approximate comparisons with mixed numeric types"
+ "Approximate comparisons with mixed numeric types",
+ "[Approx]"
)
{
const double dZero = 0;
@@ -82,8 +82,8 @@ TEST_CASE
///////////////////////////////////////////////////////////////////////////////
TEST_CASE
(
- "./succeeding/Approx/custom",
- "Use a custom approx"
+ "Use a custom approx",
+ "[Approx][custom]"
)
{
double d = 1.23;
diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt
index feb08934..54bee3e5 100644
--- a/projects/SelfTest/Baselines/console.std.approved.txt
+++ b/projects/SelfTest/Baselines/console.std.approved.txt
@@ -4,7 +4,7 @@ CatchSelfTest is a host application.
Run with -? for options
-------------------------------------------------------------------------------
-./failing/TestClass/failingCase
+A METHOD_AS_TEST_CASE based test run that fails
-------------------------------------------------------------------------------
ClassTests.cpp:
...............................................................................
@@ -15,7 +15,7 @@ with expansion:
"hello" == "world"
-------------------------------------------------------------------------------
-./failing/Fixture/failingCase
+A TEST_CASE_METHOD based test run that fails
-------------------------------------------------------------------------------
ClassTests.cpp:
...............................................................................
@@ -26,7 +26,7 @@ with expansion:
1 == 2
-------------------------------------------------------------------------------
-./failing/conditions/equality
+Equality checks that should fail]
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -97,7 +97,7 @@ with expansion:
1.3 == Approx( 1.301 )
-------------------------------------------------------------------------------
-./failing/conditions/inequality
+Inequality checks that should fails
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -128,7 +128,7 @@ with expansion:
5 != 5
-------------------------------------------------------------------------------
-./failing/conditions/ordered
+Ordering comparison checks that should fail
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -229,7 +229,7 @@ with expansion:
"hello" <= "a"
-------------------------------------------------------------------------------
-./failing/conditions/not
+'Not' checks that should fail
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -269,7 +269,7 @@ with expansion:
!(1 == 1)
-------------------------------------------------------------------------------
-./failing/exceptions/explicit
+Expected exceptions that don't throw or unexpected exceptions fail the test
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -289,7 +289,7 @@ due to unexpected exception with message:
expected exception
-------------------------------------------------------------------------------
-./failing/exceptions/implicit
+When unchecked exceptions are thrown directly they are always failures
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -299,7 +299,7 @@ due to unexpected exception with message:
unexpected exception
-------------------------------------------------------------------------------
-./failing/exceptions/implicit/2
+An unchecked exception reports the line of the last assertion
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -310,7 +310,7 @@ due to unexpected exception with message:
unexpected exception
-------------------------------------------------------------------------------
-./failing/exceptions/implicit/3
+When unchecked exceptions are thrown from sections they are always failures
section name
-------------------------------------------------------------------------------
ExceptionTests.cpp:
@@ -321,7 +321,7 @@ due to unexpected exception with message:
unexpected exception
-------------------------------------------------------------------------------
-./failing/exceptions/implicit/4
+When unchecked exceptions are thrown from functions they are always failures
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -332,7 +332,7 @@ due to unexpected exception with message:
expected exception
-------------------------------------------------------------------------------
-./failing/exceptions/custom
+Unexpected custom exceptions can be translated
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -342,7 +342,7 @@ due to unexpected exception with message:
custom exception
-------------------------------------------------------------------------------
-./failing/exceptions/custom/nothrow
+Custom exceptions can be translated when testing for nothrow
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -353,7 +353,7 @@ due to unexpected exception with message:
custom exception - not std
-------------------------------------------------------------------------------
-./failing/exceptions/custom/throw
+Custom exceptions can be translated when testing for throwing as something else
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -364,7 +364,7 @@ due to unexpected exception with message:
custom exception - not std
-------------------------------------------------------------------------------
-./failing/exceptions/custom/double
+Unexpected exceptions can be translated
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -374,7 +374,17 @@ due to unexpected exception with message:
3.14
-------------------------------------------------------------------------------
-./failing/message/info/1
+INFO and WARN do not abort tests
+-------------------------------------------------------------------------------
+MessageTests.cpp:
+...............................................................................
+
+MessageTests.cpp::
+warning:
+ this is a warning
+
+-------------------------------------------------------------------------------
+INFO gets logged on failure
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -388,7 +398,7 @@ with messages:
so should this
-------------------------------------------------------------------------------
-./mixed/message/info/2
+INFO gets logged on failure, even if captured before successful assertions
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -409,7 +419,7 @@ with message:
and this, but later
-------------------------------------------------------------------------------
-./failing/message/fail
+FAIL aborts the test
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -419,7 +429,7 @@ explicitly with message:
This is a failure
-------------------------------------------------------------------------------
-./failing/message/sections
+Output from all sections is reported
one
-------------------------------------------------------------------------------
MessageTests.cpp:
@@ -430,7 +440,7 @@ explicitly with message:
Message from section one
-------------------------------------------------------------------------------
-./failing/message/sections
+Output from all sections is reported
two
-------------------------------------------------------------------------------
MessageTests.cpp:
@@ -443,7 +453,7 @@ explicitly with message:
Message from section one
Message from section two
-------------------------------------------------------------------------------
-./mixed/message/scoped
+SCOPED_INFO is reset for each loop
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -467,7 +477,19 @@ explicitly with message:
Previous info should not be seen
-------------------------------------------------------------------------------
-./mixed/Misc/Sections/nested2
+sends information to INFO
+-------------------------------------------------------------------------------
+MessageTests.cpp:
+...............................................................................
+
+MessageTests.cpp:: FAILED:
+ REQUIRE( false )
+with messages:
+ hi
+ i := 7
+
+-------------------------------------------------------------------------------
+more nested SECTION tests
s1
s2
-------------------------------------------------------------------------------
@@ -480,7 +502,7 @@ with expansion:
1 == 2
-------------------------------------------------------------------------------
-./mixed/Misc/Sections/loops
+looped SECTION tests
s1
-------------------------------------------------------------------------------
MiscTests.cpp:
@@ -492,7 +514,7 @@ with expansion:
0 > 1
-------------------------------------------------------------------------------
-./mixed/Misc/loops
+looped tests
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -542,19 +564,7 @@ with message:
Some information
An error
-------------------------------------------------------------------------------
-./failing/info
--------------------------------------------------------------------------------
-MiscTests.cpp:
-...............................................................................
-
-MiscTests.cpp:: FAILED:
- REQUIRE( false )
-with messages:
- hi
- i := 7
-
--------------------------------------------------------------------------------
-./failing/checkedif
+checkedIf, failing
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -570,7 +580,7 @@ with expansion:
false
-------------------------------------------------------------------------------
-./failing/checkedelse
+checkedElse, failing
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -586,7 +596,7 @@ with expansion:
false
-------------------------------------------------------------------------------
-./manual/onechar
+send a single char to INFO
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -597,7 +607,7 @@ with message:
3
-------------------------------------------------------------------------------
-./failing/matchers/Contains
+Contains string matcher
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -608,7 +618,7 @@ with expansion:
"this string contains 'abc' as a substring" contains: "not there"
-------------------------------------------------------------------------------
-./failing/matchers/StartsWith
+StartsWith string matcher
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -619,7 +629,7 @@ with expansion:
"this string contains 'abc' as a substring" starts with: "string"
-------------------------------------------------------------------------------
-./failing/matchers/EndsWith
+EndsWith string matcher
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -630,7 +640,7 @@ with expansion:
"this string contains 'abc' as a substring" ends with: "this"
-------------------------------------------------------------------------------
-./failing/matchers/Equals
+Equals string matcher
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -641,7 +651,17 @@ with expansion:
"this string contains 'abc' as a substring" equals: "something else"
-------------------------------------------------------------------------------
-./failing/CatchSectionInfiniteLoop
+Nice descriptive name
+-------------------------------------------------------------------------------
+MiscTests.cpp:
+...............................................................................
+
+MiscTests.cpp::
+warning:
+ This one ran
+
+-------------------------------------------------------------------------------
+A couple of nested sections followed by a failure
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -651,7 +671,7 @@ explicitly with message:
to infinity and beyond
-------------------------------------------------------------------------------
-./failing/CatchSectionInfiniteLoop
+A couple of nested sections followed by a failure
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -661,7 +681,7 @@ explicitly with message:
to infinity and beyond
-------------------------------------------------------------------------------
-./failing/CatchSectionInfiniteLoop
+A couple of nested sections followed by a failure
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -670,18 +690,32 @@ MiscTests.cpp:: FAILED:
explicitly with message:
to infinity and beyond
-Message from section one
-Message from section two
-Some information
-An error
-Message from section one
-Message from section two
-Some information
-An error
hello
hello
-------------------------------------------------------------------------------
-./failing/Tricky/non streamable type
+Where the is more to the expression after the RHS[failing]
+-------------------------------------------------------------------------------
+TrickyTests.cpp:
+...............................................................................
+
+TrickyTests.cpp::
+warning:
+ Uncomment the code in this test to check that it gives a sensible compiler
+ error
+
+-------------------------------------------------------------------------------
+Where the LHS is not a simple value[failing]
+-------------------------------------------------------------------------------
+TrickyTests.cpp:
+...............................................................................
+
+TrickyTests.cpp::
+warning:
+ Uncomment the code in this test to check that it gives a sensible compiler
+ error
+
+-------------------------------------------------------------------------------
+A failing expression with a non streamable type is still captured[failing]
-------------------------------------------------------------------------------
TrickyTests.cpp:
...............................................................................
@@ -697,7 +731,7 @@ with expansion:
{?} == {?}
-------------------------------------------------------------------------------
-./failing/string literals
+string literals of different sizes can be compared[failing]
-------------------------------------------------------------------------------
TrickyTests.cpp:
...............................................................................
@@ -708,5 +742,5 @@ with expansion:
"first" == "second"
===============================================================================
-122 test cases - 35 failed (753 assertions - 90 failed)
+120 test cases - 35 failed (673 assertions - 90 failed)
diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt
index c85230c3..7c39bd07 100644
--- a/projects/SelfTest/Baselines/console.sw.approved.txt
+++ b/projects/SelfTest/Baselines/console.sw.approved.txt
@@ -4,7 +4,7 @@ CatchSelfTest is a host application.
Run with -? for options
-------------------------------------------------------------------------------
-./succeeding/Approx/simple
+Some simple comparisons between doubles
-------------------------------------------------------------------------------
ApproxTests.cpp:
...............................................................................
@@ -46,7 +46,7 @@ with expansion:
Approx( 1.23 ) != 1.24
-------------------------------------------------------------------------------
-./succeeding/Approx/epsilon
+Approximate comparisons with different epsilons
-------------------------------------------------------------------------------
ApproxTests.cpp:
...............................................................................
@@ -64,7 +64,7 @@ with expansion:
1.23 == Approx( 1.231 )
-------------------------------------------------------------------------------
-./succeeding/Approx/float
+Approximate comparisons with floats
-------------------------------------------------------------------------------
ApproxTests.cpp:
...............................................................................
@@ -82,7 +82,7 @@ with expansion:
0 == Approx( 0 )
-------------------------------------------------------------------------------
-./succeeding/Approx/int
+Approximate comparisons with ints
-------------------------------------------------------------------------------
ApproxTests.cpp:
...............................................................................
@@ -96,7 +96,7 @@ PASSED:
REQUIRE( 0 == Approx( 0 ) )
-------------------------------------------------------------------------------
-./succeeding/Approx/mixed
+Approximate comparisons with mixed numeric types
-------------------------------------------------------------------------------
ApproxTests.cpp:
...............................................................................
@@ -132,7 +132,7 @@ with expansion:
1.234 == Approx( 1.234 )
-------------------------------------------------------------------------------
-./succeeding/Approx/custom
+Use a custom approx
-------------------------------------------------------------------------------
ApproxTests.cpp:
...............................................................................
@@ -204,7 +204,7 @@ with expansion:
3.1428571429 != Approx( 3.141 )
-------------------------------------------------------------------------------
-./succeeding/TestClass/succeedingCase
+A METHOD_AS_TEST_CASE based test run that succeeds
-------------------------------------------------------------------------------
ClassTests.cpp:
...............................................................................
@@ -216,7 +216,7 @@ with expansion:
"hello" == "hello"
-------------------------------------------------------------------------------
-./failing/TestClass/failingCase
+A METHOD_AS_TEST_CASE based test run that fails
-------------------------------------------------------------------------------
ClassTests.cpp:
...............................................................................
@@ -227,7 +227,7 @@ with expansion:
"hello" == "world"
-------------------------------------------------------------------------------
-./succeeding/Fixture/succeedingCase
+A TEST_CASE_METHOD based test run that succeeds
-------------------------------------------------------------------------------
ClassTests.cpp:
...............................................................................
@@ -239,7 +239,7 @@ with expansion:
1 == 1
-------------------------------------------------------------------------------
-./failing/Fixture/failingCase
+A TEST_CASE_METHOD based test run that fails
-------------------------------------------------------------------------------
ClassTests.cpp:
...............................................................................
@@ -250,7 +250,7 @@ with expansion:
1 == 2
-------------------------------------------------------------------------------
-./succeeding/conditions/equality
+Equality checks that should succeed
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -298,7 +298,7 @@ with expansion:
1.3 == Approx( 1.3 )
-------------------------------------------------------------------------------
-./failing/conditions/equality
+Equality checks that should fail]
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -369,7 +369,7 @@ with expansion:
1.3 == Approx( 1.301 )
-------------------------------------------------------------------------------
-./succeeding/conditions/inequality
+Inequality checks that should succeed
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -441,7 +441,7 @@ with expansion:
5 != 6
-------------------------------------------------------------------------------
-./failing/conditions/inequality
+Inequality checks that should fails
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -472,7 +472,7 @@ with expansion:
5 != 5
-------------------------------------------------------------------------------
-./succeeding/conditions/ordered
+Ordering comparison checks that should succeed
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -580,7 +580,7 @@ with expansion:
"hello" > "a"
-------------------------------------------------------------------------------
-./failing/conditions/ordered
+Ordering comparison checks that should fail
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -681,7 +681,7 @@ with expansion:
"hello" <= "a"
-------------------------------------------------------------------------------
-./succeeding/conditions/int literals
+Comparisons with int literals don't warn when mixing signed/ unsigned
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -765,7 +765,7 @@ with expansion:
0x > 4
-------------------------------------------------------------------------------
-./succeeding/conditions//long_to_unsigned_x
+comparisons between int variables
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -795,7 +795,7 @@ with expansion:
1 == 1
-------------------------------------------------------------------------------
-./succeeding/conditions/const ints to int literal
+comparisons between const int variables
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -825,7 +825,8 @@ with expansion:
1 == 1
-------------------------------------------------------------------------------
-./succeeding/conditions/negative ints
+Comparisons between unsigned ints and negative signed ints match c++ standard
+behaviour
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -867,7 +868,7 @@ with expansion:
-2147483648 > 2
-------------------------------------------------------------------------------
-./succeeding/conditions/computed ints
+Comparisons between ints where one side is computed
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -879,7 +880,7 @@ with expansion:
54 == 54
-------------------------------------------------------------------------------
-./succeeding/conditions/ptr
+Pointers can be compared to null
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -933,7 +934,7 @@ with expansion:
0 != 0x
-------------------------------------------------------------------------------
-./succeeding/conditions/not
+'Not' checks that should succeed
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -981,7 +982,7 @@ with expansion:
!(1 == 2)
-------------------------------------------------------------------------------
-./failing/conditions/not
+'Not' checks that should fail
-------------------------------------------------------------------------------
ConditionTests.cpp:
...............................................................................
@@ -1021,7 +1022,7 @@ with expansion:
!(1 == 1)
-------------------------------------------------------------------------------
-./succeeding/exceptions/explicit
+When checked exceptions are thrown they can be expected or unexpected
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -1039,7 +1040,7 @@ PASSED:
REQUIRE_THROWS( thisThrows() )
-------------------------------------------------------------------------------
-./failing/exceptions/explicit
+Expected exceptions that don't throw or unexpected exceptions fail the test
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -1059,7 +1060,7 @@ due to unexpected exception with message:
expected exception
-------------------------------------------------------------------------------
-./failing/exceptions/implicit
+When unchecked exceptions are thrown directly they are always failures
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -1069,7 +1070,7 @@ due to unexpected exception with message:
unexpected exception
-------------------------------------------------------------------------------
-./failing/exceptions/implicit/2
+An unchecked exception reports the line of the last assertion
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -1084,7 +1085,7 @@ due to unexpected exception with message:
unexpected exception
-------------------------------------------------------------------------------
-./failing/exceptions/implicit/3
+When unchecked exceptions are thrown from sections they are always failures
section name
-------------------------------------------------------------------------------
ExceptionTests.cpp:
@@ -1095,7 +1096,7 @@ due to unexpected exception with message:
unexpected exception
-------------------------------------------------------------------------------
-./failing/exceptions/implicit/4
+When unchecked exceptions are thrown from functions they are always failures
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -1106,16 +1107,16 @@ due to unexpected exception with message:
expected exception
-------------------------------------------------------------------------------
-./succeeding/exceptions/implicit
+When unchecked exceptions are thrown, but caught, they do not affect the test
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
-No assertions in test case './succeeding/exceptions/implicit'
+No assertions in test case 'When unchecked exceptions are thrown, but caught, they do not affect the test'
-------------------------------------------------------------------------------
-./failing/exceptions/custom
+Unexpected custom exceptions can be translated
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -1125,7 +1126,7 @@ due to unexpected exception with message:
custom exception
-------------------------------------------------------------------------------
-./failing/exceptions/custom/nothrow
+Custom exceptions can be translated when testing for nothrow
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -1136,7 +1137,7 @@ due to unexpected exception with message:
custom exception - not std
-------------------------------------------------------------------------------
-./failing/exceptions/custom/throw
+Custom exceptions can be translated when testing for throwing as something else
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -1147,7 +1148,7 @@ due to unexpected exception with message:
custom exception - not std
-------------------------------------------------------------------------------
-./failing/exceptions/custom/double
+Unexpected exceptions can be translated
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -1157,7 +1158,7 @@ due to unexpected exception with message:
3.14
-------------------------------------------------------------------------------
-./succeeding/exceptions/notimplemented
+NotImplemented exception
-------------------------------------------------------------------------------
ExceptionTests.cpp:
...............................................................................
@@ -1167,7 +1168,7 @@ PASSED:
REQUIRE_THROWS( thisFunctionNotImplemented( 7 ) )
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1185,7 +1186,7 @@ with expansion:
200 == 200
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1203,7 +1204,7 @@ with expansion:
200 == 200
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1221,7 +1222,7 @@ with expansion:
200 == 200
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1239,7 +1240,7 @@ with expansion:
200 == 200
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1257,7 +1258,7 @@ with expansion:
200 == 200
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1275,7 +1276,7 @@ with expansion:
200 == 200
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1293,7 +1294,7 @@ with expansion:
200 == 200
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1311,7 +1312,7 @@ with expansion:
200 == 200
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1329,7 +1330,7 @@ with expansion:
200 == 200
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1347,7 +1348,7 @@ with expansion:
202 == 202
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1365,7 +1366,7 @@ with expansion:
202 == 202
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1383,7 +1384,7 @@ with expansion:
202 == 202
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1401,7 +1402,7 @@ with expansion:
202 == 202
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1419,7 +1420,7 @@ with expansion:
202 == 202
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1437,7 +1438,7 @@ with expansion:
202 == 202
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1455,7 +1456,7 @@ with expansion:
202 == 202
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1473,7 +1474,7 @@ with expansion:
202 == 202
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1491,7 +1492,7 @@ with expansion:
202 == 202
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1509,7 +1510,7 @@ with expansion:
204 == 204
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1527,7 +1528,7 @@ with expansion:
204 == 204
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1545,7 +1546,7 @@ with expansion:
204 == 204
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1563,7 +1564,7 @@ with expansion:
204 == 204
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1581,7 +1582,7 @@ with expansion:
204 == 204
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1599,7 +1600,7 @@ with expansion:
204 == 204
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1617,7 +1618,7 @@ with expansion:
204 == 204
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1635,7 +1636,7 @@ with expansion:
204 == 204
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1653,7 +1654,7 @@ with expansion:
204 == 204
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1671,7 +1672,7 @@ with expansion:
206 == 206
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1689,7 +1690,7 @@ with expansion:
206 == 206
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1707,7 +1708,7 @@ with expansion:
206 == 206
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1725,7 +1726,7 @@ with expansion:
206 == 206
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1743,7 +1744,7 @@ with expansion:
206 == 206
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1761,7 +1762,7 @@ with expansion:
206 == 206
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1779,7 +1780,7 @@ with expansion:
206 == 206
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1797,7 +1798,7 @@ with expansion:
206 == 206
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1815,7 +1816,7 @@ with expansion:
206 == 206
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1833,7 +1834,7 @@ with expansion:
208 == 208
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1851,7 +1852,7 @@ with expansion:
208 == 208
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1869,7 +1870,7 @@ with expansion:
208 == 208
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1887,7 +1888,7 @@ with expansion:
208 == 208
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1905,7 +1906,7 @@ with expansion:
208 == 208
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1923,7 +1924,7 @@ with expansion:
208 == 208
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1941,7 +1942,7 @@ with expansion:
208 == 208
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1959,7 +1960,7 @@ with expansion:
208 == 208
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1977,7 +1978,7 @@ with expansion:
208 == 208
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -1995,7 +1996,7 @@ with expansion:
210 == 210
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2013,7 +2014,7 @@ with expansion:
210 == 210
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2031,7 +2032,7 @@ with expansion:
210 == 210
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2049,7 +2050,7 @@ with expansion:
210 == 210
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2067,7 +2068,7 @@ with expansion:
210 == 210
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2085,7 +2086,7 @@ with expansion:
210 == 210
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2103,7 +2104,7 @@ with expansion:
210 == 210
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2121,7 +2122,7 @@ with expansion:
210 == 210
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2139,7 +2140,7 @@ with expansion:
210 == 210
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2157,7 +2158,7 @@ with expansion:
212 == 212
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2175,7 +2176,7 @@ with expansion:
212 == 212
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2193,7 +2194,7 @@ with expansion:
212 == 212
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2211,7 +2212,7 @@ with expansion:
212 == 212
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2229,7 +2230,7 @@ with expansion:
212 == 212
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2247,7 +2248,7 @@ with expansion:
212 == 212
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2265,7 +2266,7 @@ with expansion:
212 == 212
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2283,7 +2284,7 @@ with expansion:
212 == 212
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2301,7 +2302,7 @@ with expansion:
212 == 212
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2319,7 +2320,7 @@ with expansion:
214 == 214
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2337,7 +2338,7 @@ with expansion:
214 == 214
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2355,7 +2356,7 @@ with expansion:
214 == 214
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2373,7 +2374,7 @@ with expansion:
214 == 214
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2391,7 +2392,7 @@ with expansion:
214 == 214
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2409,7 +2410,7 @@ with expansion:
214 == 214
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2427,7 +2428,7 @@ with expansion:
214 == 214
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2445,7 +2446,7 @@ with expansion:
214 == 214
-------------------------------------------------------------------------------
-./succeeding/generators/1
+Generators over two ranges
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2463,7 +2464,7 @@ with expansion:
214 == 214
-------------------------------------------------------------------------------
-./succeeding/generators/2
+Generator over a range of pairs
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2475,7 +2476,7 @@ with expansion:
0 == 0
-------------------------------------------------------------------------------
-./succeeding/generators/2
+Generator over a range of pairs
-------------------------------------------------------------------------------
GeneratorTests.cpp:
...............................................................................
@@ -2487,7 +2488,7 @@ with expansion:
2 == 2
-------------------------------------------------------------------------------
-./succeeding/message
+INFO and WARN do not abort tests
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -2498,10 +2499,10 @@ warning:
this is a warning
-No assertions in test case './succeeding/message'
+No assertions in test case 'INFO and WARN do not abort tests'
-------------------------------------------------------------------------------
-./succeeding/succeed
+SUCCEED counts as a test pass
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -2512,7 +2513,7 @@ with message:
this is a success
-------------------------------------------------------------------------------
-./failing/message/info/1
+INFO gets logged on failure
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -2526,7 +2527,7 @@ with messages:
so should this
-------------------------------------------------------------------------------
-./mixed/message/info/2
+INFO gets logged on failure, even if captured before successful assertions
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -2562,7 +2563,7 @@ with message:
but not this
-------------------------------------------------------------------------------
-./failing/message/fail
+FAIL aborts the test
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -2572,7 +2573,7 @@ explicitly with message:
This is a failure
-------------------------------------------------------------------------------
-./failing/message/sections
+Output from all sections is reported
one
-------------------------------------------------------------------------------
MessageTests.cpp:
@@ -2583,7 +2584,7 @@ explicitly with message:
Message from section one
-------------------------------------------------------------------------------
-./failing/message/sections
+Output from all sections is reported
two
-------------------------------------------------------------------------------
MessageTests.cpp:
@@ -2595,7 +2596,7 @@ explicitly with message:
Message from section one
-------------------------------------------------------------------------------
-./succeeding/message/sections/stdout
+Standard output from all sections is reported
one
-------------------------------------------------------------------------------
MessageTests.cpp:
@@ -2606,7 +2607,7 @@ No assertions in section 'one'
Message from section two
-------------------------------------------------------------------------------
-./succeeding/message/sections/stdout
+Standard output from all sections is reported
two
-------------------------------------------------------------------------------
MessageTests.cpp:
@@ -2616,7 +2617,7 @@ MessageTests.cpp:
No assertions in section 'two'
-------------------------------------------------------------------------------
-./mixed/message/scoped
+SCOPED_INFO is reset for each loop
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -2720,7 +2721,7 @@ with messages:
i := 10
-------------------------------------------------------------------------------
-./succeeding/nofail
+The NO_FAIL macro reports a failure but does not fail the test
-------------------------------------------------------------------------------
MessageTests.cpp:
...............................................................................
@@ -2730,7 +2731,7 @@ FAILED - but was ok:
CHECK_NOFAIL( 1 == 2 )
-No assertions in test case './succeeding/nofail'
+No assertions in test case 'The NO_FAIL macro reports a failure but does not fail the test'
-------------------------------------------------------------------------------
just info
@@ -2752,7 +2753,19 @@ explicitly with message:
Previous info should not be seen
-------------------------------------------------------------------------------
-./succeeding/Misc/Sections
+sends information to INFO
+-------------------------------------------------------------------------------
+MessageTests.cpp:
+...............................................................................
+
+MessageTests.cpp:: FAILED:
+ REQUIRE( false )
+with messages:
+ hi
+ i := 7
+
+-------------------------------------------------------------------------------
+random SECTION tests
s1
-------------------------------------------------------------------------------
MiscTests.cpp:
@@ -2771,7 +2784,7 @@ with expansion:
2 != 1
-------------------------------------------------------------------------------
-./succeeding/Misc/Sections
+random SECTION tests
s2
-------------------------------------------------------------------------------
MiscTests.cpp:
@@ -2784,7 +2797,7 @@ with expansion:
1 != 2
-------------------------------------------------------------------------------
-./succeeding/Misc/Sections/nested
+nested SECTION tests
s1
-------------------------------------------------------------------------------
MiscTests.cpp:
@@ -2803,7 +2816,7 @@ with expansion:
2 != 1
-------------------------------------------------------------------------------
-./succeeding/Misc/Sections/nested
+nested SECTION tests
s1
-------------------------------------------------------------------------------
MiscTests.cpp:
@@ -2822,7 +2835,7 @@ with expansion:
2 != 1
-------------------------------------------------------------------------------
-./succeeding/Misc/Sections/nested
+nested SECTION tests
s1
s2
-------------------------------------------------------------------------------
@@ -2836,7 +2849,7 @@ with expansion:
1 != 2
-------------------------------------------------------------------------------
-./mixed/Misc/Sections/nested2
+more nested SECTION tests
s1
s2
-------------------------------------------------------------------------------
@@ -2849,7 +2862,7 @@ with expansion:
1 == 2
-------------------------------------------------------------------------------
-./mixed/Misc/Sections/nested2
+more nested SECTION tests
s1
s3
-------------------------------------------------------------------------------
@@ -2863,7 +2876,7 @@ with expansion:
1 != 2
-------------------------------------------------------------------------------
-./mixed/Misc/Sections/nested2
+more nested SECTION tests
s1
s4
-------------------------------------------------------------------------------
@@ -2877,7 +2890,7 @@ with expansion:
1 < 2
-------------------------------------------------------------------------------
-./Sections/nested/a/b
+even more nested SECTION tests
c
d (leaf)
-------------------------------------------------------------------------------
@@ -2888,7 +2901,7 @@ MiscTests.cpp:
No assertions in section 'd (leaf)'
-------------------------------------------------------------------------------
-./Sections/nested/a/b
+even more nested SECTION tests
c
e (leaf)
-------------------------------------------------------------------------------
@@ -2899,7 +2912,7 @@ MiscTests.cpp:
No assertions in section 'e (leaf)'
-------------------------------------------------------------------------------
-./Sections/nested/a/b
+even more nested SECTION tests
f (leaf)
-------------------------------------------------------------------------------
MiscTests.cpp:
@@ -2909,7 +2922,7 @@ MiscTests.cpp:
No assertions in section 'f (leaf)'
-------------------------------------------------------------------------------
-./mixed/Misc/Sections/loops
+looped SECTION tests
s1
-------------------------------------------------------------------------------
MiscTests.cpp:
@@ -2921,7 +2934,7 @@ with expansion:
0 > 1
-------------------------------------------------------------------------------
-./mixed/Misc/loops
+looped tests
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -2987,16 +3000,16 @@ with message:
Some information
An error
-------------------------------------------------------------------------------
-./succeeding/Misc/stdout,stderr
+Sends stuff to stdout and stderr
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
-No assertions in test case './succeeding/Misc/stdout,stderr'
+No assertions in test case 'Sends stuff to stdout and stderr'
-------------------------------------------------------------------------------
-./succeeding/Misc/null strings
+null strings
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3014,19 +3027,7 @@ with expansion:
{null string} == {null string}
-------------------------------------------------------------------------------
-./failing/info
--------------------------------------------------------------------------------
-MiscTests.cpp:
-...............................................................................
-
-MiscTests.cpp:: FAILED:
- REQUIRE( false )
-with messages:
- hi
- i := 7
-
--------------------------------------------------------------------------------
-./succeeding/checkedif
+checkedIf
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3044,7 +3045,7 @@ with expansion:
true
-------------------------------------------------------------------------------
-./failing/checkedif
+checkedIf, failing
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3060,7 +3061,7 @@ with expansion:
false
-------------------------------------------------------------------------------
-./succeeding/checkedelse
+checkedElse
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3078,7 +3079,7 @@ with expansion:
true
-------------------------------------------------------------------------------
-./failing/checkedelse
+checkedElse, failing
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3094,7 +3095,7 @@ with expansion:
false
-------------------------------------------------------------------------------
-./misc/xmlentitycheck
+xmlentitycheck
embedded xml
-------------------------------------------------------------------------------
MiscTests.cpp:
@@ -3104,7 +3105,7 @@ MiscTests.cpp:
No assertions in section 'embedded xml'
-------------------------------------------------------------------------------
-./misc/xmlentitycheck
+xmlentitycheck
encoded chars
-------------------------------------------------------------------------------
MiscTests.cpp:
@@ -3114,7 +3115,7 @@ MiscTests.cpp:
No assertions in section 'encoded chars'
-------------------------------------------------------------------------------
-./manual/onechar
+send a single char to INFO
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3125,7 +3126,7 @@ with message:
3
-------------------------------------------------------------------------------
-./succeeding/atomic if
+atomic if
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3137,7 +3138,7 @@ with expansion:
0 == 0
-------------------------------------------------------------------------------
-./succeeding/matchers
+String matchers
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3167,7 +3168,7 @@ with expansion:
"this string contains 'abc' as a substring" ends with: "substring"
-------------------------------------------------------------------------------
-./failing/matchers/Contains
+Contains string matcher
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3178,7 +3179,7 @@ with expansion:
"this string contains 'abc' as a substring" contains: "not there"
-------------------------------------------------------------------------------
-./failing/matchers/StartsWith
+StartsWith string matcher
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3189,7 +3190,7 @@ with expansion:
"this string contains 'abc' as a substring" starts with: "string"
-------------------------------------------------------------------------------
-./failing/matchers/EndsWith
+EndsWith string matcher
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3200,7 +3201,7 @@ with expansion:
"this string contains 'abc' as a substring" ends with: "this"
-------------------------------------------------------------------------------
-./failing/matchers/Equals
+Equals string matcher
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3211,7 +3212,7 @@ with expansion:
"this string contains 'abc' as a substring" equals: "something else"
-------------------------------------------------------------------------------
-string
+Equals string matcher, with NULL
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3223,7 +3224,7 @@ with expansion:
"" equals: ""
-------------------------------------------------------------------------------
-./succeeding/matchers/AllOf
+AllOf matcher
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3236,7 +3237,7 @@ with expansion:
contains: "abc" )
-------------------------------------------------------------------------------
-./succeeding/matchers/AnyOf
+AnyOf matcher
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3256,7 +3257,7 @@ with expansion:
contains: "string" )
-------------------------------------------------------------------------------
-./succeeding/matchers/Equals
+Equals
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3305,13 +3306,13 @@ with expansion:
0x == 3628800
-------------------------------------------------------------------------------
-empty
+An empty test with no assertions
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
-No assertions in test case 'empty'
+No assertions in test case 'An empty test with no assertions'
-------------------------------------------------------------------------------
Nice descriptive name
@@ -3562,7 +3563,7 @@ with expansion:
5 >= 5
-------------------------------------------------------------------------------
-./failing/CatchSectionInfiniteLoop
+A couple of nested sections followed by a failure
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3572,7 +3573,7 @@ explicitly with message:
to infinity and beyond
-------------------------------------------------------------------------------
-./failing/CatchSectionInfiniteLoop
+A couple of nested sections followed by a failure
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3582,7 +3583,7 @@ explicitly with message:
to infinity and beyond
-------------------------------------------------------------------------------
-./failing/CatchSectionInfiniteLoop
+A couple of nested sections followed by a failure
Outer
Inner
-------------------------------------------------------------------------------
@@ -3595,7 +3596,7 @@ with message:
that's not flying - that's failing in style
-------------------------------------------------------------------------------
-./failing/CatchSectionInfiniteLoop
+A couple of nested sections followed by a failure
-------------------------------------------------------------------------------
MiscTests.cpp:
...............................................................................
@@ -3604,458 +3605,6 @@ MiscTests.cpp:: FAILED:
explicitly with message:
to infinity and beyond
--------------------------------------------------------------------------------
-selftest/main
- selftest/expected result
- selftest/expected result/failing tests
--------------------------------------------------------------------------------
-TestMain.cpp:
-...............................................................................
-
-catch_self_test.hpp::
-PASSED:
-with message:
- Tests failed, as expected
-
-catch_self_test.hpp: