mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-24 21:49:24 +00:00
Converted all test case names to "modern" style (freeform text + tags)
This commit is contained in:
parent
a9fd5b3f14
commit
337dc25ed7
17 changed files with 587 additions and 1217 deletions
|
@ -13,52 +13,6 @@
|
|||
#include "internal/catch_text.h"
|
||||
#include "internal/catch_console_colour.hpp"
|
||||
|
||||
TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" ) {
|
||||
using namespace Catch;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
SECTION( "selftest/expected result",
|
||||
"Tests do what they claim" ) {
|
||||
|
||||
SECTION( "selftest/expected result/failing tests",
|
||||
"Tests in the 'failing' branch fail" ) {
|
||||
MetaTestRunner::runMatching( "./failing/*", MetaTestRunner::Expected::ToFail, 0, 2 );
|
||||
}
|
||||
|
||||
SECTION( "selftest/expected result/succeeding tests",
|
||||
"Tests in the 'succeeding' branch succeed" ) {
|
||||
MetaTestRunner::runMatching( "./succeeding/*", MetaTestRunner::Expected::ToSucceed, 1, 2 );
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
SECTION( "selftest/test counts",
|
||||
"Number of test cases that run is fixed" ) {
|
||||
EmbeddedRunner runner;
|
||||
|
||||
SECTION( "selftest/test counts/succeeding tests",
|
||||
"Number of 'succeeding' tests is fixed" ) {
|
||||
Totals totals = runner.runMatching( "./succeeding/*", 0, 2 );
|
||||
CHECK( totals.assertions.passed == 298 );
|
||||
CHECK( totals.assertions.failed == 0 );
|
||||
}
|
||||
|
||||
SECTION( "selftest/test counts/failing tests",
|
||||
"Number of 'failing' tests is fixed" ) {
|
||||
Totals totals = runner.runMatching( "./failing/*", 1, 2 );
|
||||
CHECK( totals.assertions.passed == 2 );
|
||||
CHECK( totals.assertions.failed == 77 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE( "meta/Misc/Sections", "looped tests" ) {
|
||||
Catch::EmbeddedRunner runner;
|
||||
|
||||
Catch::Totals totals = runner.runMatching( "./mixed/Misc/Sections/nested2", 0, 1 );
|
||||
CHECK( totals.assertions.passed == 2 );
|
||||
CHECK( totals.assertions.failed == 1 );
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic ignored "-Wweak-vtables"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue