Fixed reference to basic reporter (to console reporter)

This commit is contained in:
Phil Nash 2012-12-14 18:17:47 +00:00
parent cf5ced59d1
commit 8b71158540
4 changed files with 36 additions and 33 deletions

View File

@ -378,12 +378,12 @@ namespace Catch {
virtual std::string optionDescription() const { virtual std::string optionDescription() const {
return return
"A reporter is an object that formats and structures the output of running " "A reporter is an object that formats and structures the output of running "
"tests, and potentially summarises the results. By default a basic reporter " "tests, and potentially summarises the results. By default the console reporter "
"is used that writes IDE friendly results. CATCH comes bundled with some " "is used which writes IDE friendly results. CATCH comes bundled with some "
"alternative reporters, but more can be added in client code.\n" "alternative reporters, but more can be added in client code.\n"
"\n" "\n"
"The bundled reporters are:\n" "The bundled reporters are:\n"
" -r basic\n" " -r console\n"
" -r xml\n" " -r xml\n"
" -r junit\n" " -r junit\n"
"\n" "\n"

View File

@ -2026,8 +2026,8 @@ Summary for test case './failing/matchers/Equals':
1 test case - failed (1 assertion - failed) 1 test case - failed (1 assertion - failed)
-- Test case: '/succeeding/matchers/AllOf' --------------------- -- Test case: '/succeeding/matchers/AllOf' ---------------------
MiscTests.cpp:245: MiscTests.cpp:248:
[245] testStringForMatching() AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) [248] testStringForMatching() AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) )
succeeded succeeded
for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" ) for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" )
@ -2036,12 +2036,12 @@ Summary for test case '/succeeding/matchers/AllOf':
All tests passed (1 assertion in 1 test case) All tests passed (1 assertion in 1 test case)
-- Test case: '/succeeding/matchers/AnyOf' --------------------- -- Test case: '/succeeding/matchers/AnyOf' ---------------------
MiscTests.cpp:249: MiscTests.cpp:252:
[249] testStringForMatching() AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) ) [252] testStringForMatching() AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) )
succeeded succeeded
for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "not there" ) for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "not there" )
[250] testStringForMatching() AnyOf( Catch::Contains( "not there" ), Catch::Contains( "string" ) ) [253] testStringForMatching() AnyOf( Catch::Contains( "not there" ), Catch::Contains( "string" ) )
succeeded succeeded
for: "this string contains 'abc' as a substring" ( contains: "not there" or contains: "string" ) for: "this string contains 'abc' as a substring" ( contains: "not there" or contains: "string" )
@ -2050,8 +2050,8 @@ Summary for test case '/succeeding/matchers/AnyOf':
All tests passed (2 assertions in 1 test case) All tests passed (2 assertions in 1 test case)
-- Test case: './succeeding/matchers/Equals' ------------------- -- Test case: './succeeding/matchers/Equals' -------------------
MiscTests.cpp:255: MiscTests.cpp:258:
[255] testStringForMatching() Equals( "this string contains 'abc' as a substring" ) [258] testStringForMatching() Equals( "this string contains 'abc' as a substring" )
succeeded succeeded
for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring"
@ -2060,24 +2060,24 @@ Summary for test case './succeeding/matchers/Equals':
All tests passed (1 assertion in 1 test case) All tests passed (1 assertion in 1 test case)
-- Test case: 'example/factorial' ------------------------------ -- Test case: 'example/factorial' ------------------------------
MiscTests.cpp:266: MiscTests.cpp:269:
[266] Factorial(0) == 1 [269] Factorial(0) == 1
succeeded succeeded
for: 1 == 1 for: 1 == 1
[267] Factorial(1) == 1 [270] Factorial(1) == 1
succeeded succeeded
for: 1 == 1 for: 1 == 1
[268] Factorial(2) == 2 [271] Factorial(2) == 2
succeeded succeeded
for: 2 == 2 for: 2 == 2
[269] Factorial(3) == 6 [272] Factorial(3) == 6
succeeded succeeded
for: 6 == 6 for: 6 == 6
[270] Factorial(10) == 3628800 [273] Factorial(10) == 3628800
succeeded succeeded
for: 0x<hex digits> == 3628800 for: 0x<hex digits> == 3628800
@ -2094,8 +2094,8 @@ Summary for test case 'empty':
1 test case - failed (1 assertion - failed) 1 test case - failed (1 assertion - failed)
-- Test case: 'Nice descriptive name' -------------------------- -- Test case: 'Nice descriptive name' --------------------------
MiscTests.cpp:279: MiscTests.cpp:282:
[279] [warning: This one ran] [282] [warning: This one ran]
No assertions in test case, 'Nice descriptive name' No assertions in test case, 'Nice descriptive name'
@ -2613,7 +2613,7 @@ Summary for section 'test lists':
1 assertion passed 1 assertion passed
-- Section: 'reporter' ----------------------------------------- -- Section: 'reporter' -----------------------------------------
-- Section: '-r/basic' ----------------------------------------- -- Section: '-r/console' ---------------------------------------
TestMain.cpp:169: TestMain.cpp:169:
[169] parseIntoConfig( argv, config ) [169] parseIntoConfig( argv, config )
succeeded succeeded
@ -2623,7 +2623,7 @@ succeeded
for: "console" == "console" for: "console" == "console"
---------------------------------------------------------------- ----------------------------------------------------------------
Summary for section '-r/basic': Summary for section '-r/console':
All 2 assertions passed All 2 assertions passed
---------------------------------------------------------------- ----------------------------------------------------------------
@ -4084,7 +4084,7 @@ MiscTests.cpp:240:
<testcase classname="global" name="empty" time="tbd"/> <testcase classname="global" name="empty" time="tbd"/>
<testcase classname="global" name="Nice descriptive name" time="tbd"> <testcase classname="global" name="Nice descriptive name" time="tbd">
<warning type="WARN"> <warning type="WARN">
MiscTests.cpp:279: MiscTests.cpp:282:
</warning> </warning>
</testcase> </testcase>
<testcase classname="global" name="first tag" time="tbd"/> <testcase classname="global" name="first tag" time="tbd"/>
@ -7449,7 +7449,7 @@ MiscTests.cpp" line="240">
<OverallResult success="false"/> <OverallResult success="false"/>
</TestCase> </TestCase>
<TestCase name="/succeeding/matchers/AllOf"> <TestCase name="/succeeding/matchers/AllOf">
MiscTests.cpp" line="245"> MiscTests.cpp" line="248">
<Original> <Original>
testStringForMatching() AllOf( Catch::Contains( &quot;string&quot; ), Catch::Contains( &quot;abc&quot; ) ) testStringForMatching() AllOf( Catch::Contains( &quot;string&quot; ), Catch::Contains( &quot;abc&quot; ) )
</Original> </Original>
@ -7460,7 +7460,7 @@ MiscTests.cpp" line="245">
<OverallResult success="true"/> <OverallResult success="true"/>
</TestCase> </TestCase>
<TestCase name="/succeeding/matchers/AnyOf"> <TestCase name="/succeeding/matchers/AnyOf">
MiscTests.cpp" line="249"> MiscTests.cpp" line="252">
<Original> <Original>
testStringForMatching() AnyOf( Catch::Contains( &quot;string&quot; ), Catch::Contains( &quot;not there&quot; ) ) testStringForMatching() AnyOf( Catch::Contains( &quot;string&quot; ), Catch::Contains( &quot;not there&quot; ) )
</Original> </Original>
@ -7468,7 +7468,7 @@ MiscTests.cpp" line="249">
&quot;this string contains 'abc' as a substring&quot; ( contains: &quot;string&quot; or contains: &quot;not there&quot; ) &quot;this string contains 'abc' as a substring&quot; ( contains: &quot;string&quot; or contains: &quot;not there&quot; )
</Expanded> </Expanded>
</Expression> </Expression>
MiscTests.cpp" line="250"> MiscTests.cpp" line="253">
<Original> <Original>
testStringForMatching() AnyOf( Catch::Contains( &quot;not there&quot; ), Catch::Contains( &quot;string&quot; ) ) testStringForMatching() AnyOf( Catch::Contains( &quot;not there&quot; ), Catch::Contains( &quot;string&quot; ) )
</Original> </Original>
@ -7479,7 +7479,7 @@ MiscTests.cpp" line="250">
<OverallResult success="true"/> <OverallResult success="true"/>
</TestCase> </TestCase>
<TestCase name="./succeeding/matchers/Equals"> <TestCase name="./succeeding/matchers/Equals">
MiscTests.cpp" line="255"> MiscTests.cpp" line="258">
<Original> <Original>
testStringForMatching() Equals( &quot;this string contains 'abc' as a substring&quot; ) testStringForMatching() Equals( &quot;this string contains 'abc' as a substring&quot; )
</Original> </Original>
@ -7490,7 +7490,7 @@ MiscTests.cpp" line="255">
<OverallResult success="true"/> <OverallResult success="true"/>
</TestCase> </TestCase>
<TestCase name="example/factorial"> <TestCase name="example/factorial">
MiscTests.cpp" line="266"> MiscTests.cpp" line="269">
<Original> <Original>
Factorial(0) == 1 Factorial(0) == 1
</Original> </Original>
@ -7498,7 +7498,7 @@ MiscTests.cpp" line="266">
1 == 1 1 == 1
</Expanded> </Expanded>
</Expression> </Expression>
MiscTests.cpp" line="267"> MiscTests.cpp" line="270">
<Original> <Original>
Factorial(1) == 1 Factorial(1) == 1
</Original> </Original>
@ -7506,7 +7506,7 @@ MiscTests.cpp" line="267">
1 == 1 1 == 1
</Expanded> </Expanded>
</Expression> </Expression>
MiscTests.cpp" line="268"> MiscTests.cpp" line="271">
<Original> <Original>
Factorial(2) == 2 Factorial(2) == 2
</Original> </Original>
@ -7514,7 +7514,7 @@ MiscTests.cpp" line="268">
2 == 2 2 == 2
</Expanded> </Expanded>
</Expression> </Expression>
MiscTests.cpp" line="269"> MiscTests.cpp" line="272">
<Original> <Original>
Factorial(3) == 6 Factorial(3) == 6
</Original> </Original>
@ -7522,7 +7522,7 @@ MiscTests.cpp" line="269">
6 == 6 6 == 6
</Expanded> </Expanded>
</Expression> </Expression>
MiscTests.cpp" line="270"> MiscTests.cpp" line="273">
<Original> <Original>
Factorial(10) == 3628800 Factorial(10) == 3628800
</Original> </Original>
@ -7926,7 +7926,7 @@ TestMain.cpp" line="162">
<OverallResults successes="0" failures="0"/> <OverallResults successes="0" failures="0"/>
</Section> </Section>
<Section name="reporter"> <Section name="reporter">
<Section name="-r/basic"> <Section name="-r/console">
TestMain.cpp" line="169"> TestMain.cpp" line="169">
<Original> <Original>
parseIntoConfig( argv, config ) parseIntoConfig( argv, config )

View File

@ -239,7 +239,10 @@ TEST_CASE("./failing/matchers/Equals", "")
{ {
CHECK_THAT( testStringForMatching(), Equals( "something else" ) ); CHECK_THAT( testStringForMatching(), Equals( "something else" ) );
} }
//TEST_CASE("string", "Equals with NULL")
//{
// REQUIRE_THAT("", Equals(NULL));
//}
TEST_CASE("/succeeding/matchers/AllOf", "") TEST_CASE("/succeeding/matchers/AllOf", "")
{ {
CHECK_THAT( testStringForMatching(), AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) ); CHECK_THAT( testStringForMatching(), AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) );

View File

@ -164,7 +164,7 @@ TEST_CASE( "selftest/parser/2", "ConfigData" ) {
} }
SECTION( "reporter", "" ) { SECTION( "reporter", "" ) {
SECTION( "-r/basic", "" ) { SECTION( "-r/console", "" ) {
const char* argv[] = { "test", "-r", "console" }; const char* argv[] = { "test", "-r", "console" };
CHECK_NOTHROW( parseIntoConfig( argv, config ) ); CHECK_NOTHROW( parseIntoConfig( argv, config ) );