console reporter is now a full replacement for the basic reporter, using the new streaming interface directly

This commit is contained in:
Phil Nash 2012-12-09 21:46:15 +00:00
parent 51f0572209
commit f4c0a1848d
3 changed files with 11 additions and 11 deletions

View File

@ -14,9 +14,10 @@ filteredResultsPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/unap
cmdPath = sys.argv[1]
f = open( rawResultsPath, 'w' )
subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "basic" ], stdout=f, stderr=f )
subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "basic", "-a", "4" ], stdout=f, stderr=f )
#subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "console" ], stdout=f, stderr=f )
#subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "basic" ], stdout=f, stderr=f )
#subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "basic", "-a", "4" ], stdout=f, stderr=f )
subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "console" ], stdout=f, stderr=f )
subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "console", "-a", "4" ], stdout=f, stderr=f )
subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "junit" ], stdout=f, stderr=f )
subprocess.call([ cmdPath, "~dummy", "-s", "-w", "NoAssertions", "-r", "xml" ], stdout=f, stderr=f )
f.close()

View File

@ -46,6 +46,8 @@ namespace Catch {
}
std::string makeSectionPath( ThreadedSectionInfo const * section, std::string const& delimiter ) {
std::string sectionPath = "'" + section->name + "'";
// !TBD: Do this without the assignment in the while as it causes warnings:
while( ( section = section->parent.get() ) )
sectionPath = "'" + section->name + "'" + delimiter + sectionPath;
return sectionPath;

View File

@ -1,6 +1,5 @@
[Started testing: CatchSelfTest]
[Started group: '~dummy']
[Running: ./succeeding/Approx/simple]
ApproxTests.cpp:20: d == Approx( 1.23 ) succeeded for: 1.23 == Approx( 1.23 )
ApproxTests.cpp:21: d != Approx( 1.22 ) succeeded for: 1.23 != Approx( 1.22 )
@ -453,7 +452,6 @@ MessageTests.cpp:51: failed with message: 'This is a failure'
[Finished: './failing/message/fail' 1 test case failed (1 assertion failed)]
[Running: ./failing/message/sections]
[Started section: 'one']
MessageTests.cpp:58: failed with message: 'Message from section one'
[End of section: 'one' 1 assertion failed]
@ -463,8 +461,8 @@ MessageTests.cpp:63: failed with message: 'Message from section two'
[End of section: 'two' 1 assertion failed]
[Finished: './failing/message/sections' 1 test case failed (All 2 assertions failed)]
Message from section one
Message from section one
[Running: ./succeeding/message/sections/stdout]
[Started section: 'one']
@ -604,9 +602,9 @@ MiscTests.cpp:115: ( fib[i] % 2 ) == 0 failed for: 1 == 0
MiscTests.cpp:114: [info: Testing if fib[7] (21) is even]
MiscTests.cpp:115: ( fib[i] % 2 ) == 0 failed for: 1 == 0
[Finished: './mixed/Misc/loops' 1 test case failed (6 of 8 assertions failed)]
Some information
An error
[Running: ./succeeding/Misc/stdout,stderr]
No assertions in test case, './succeeding/Misc/stdout,stderr'
@ -1335,14 +1333,13 @@ BDDTests.cpp:37: itDoesThis() succeeded for: true
[End of section: 'This stuff exists' 1 assertion passed]
[Finished: 'scenario name' All tests passed (1 assertion in 1 test case)]
[End of group: '~dummy'. 44 of 95 test cases failed (101 of 607 assertions failed)]
[End of group '~dummy'. 44 of 95 test cases failed (101 of 607 assertions failed)]
[Testing completed. 44 of 95 test cases failed (101 of 607 assertions failed)]
[Started testing: CatchSelfTest]
[Started group: '~dummy']
[Running: ./succeeding/Approx/simple]
ApproxTests.cpp:20: d == Approx( 1.23 ) succeeded for: 1.23 == Approx( 1.23 )
ApproxTests.cpp:21: d != Approx( 1.22 ) succeeded for: 1.23 != Approx( 1.22 )
@ -1416,10 +1413,10 @@ ConditionTests.cpp:63: x == Approx( 1.3 ) succeeded for: 1.3 == Approx( 1.3 )
ConditionTests.cpp:71: data.int_seven == 6 failed for: 7 == 6
ConditionTests.cpp:72: data.int_seven == 8 failed for: 7 == 8
[Finished: './failing/conditions/equality' 1 test case failed (All 2 assertions failed)]
[End of group: '~dummy'. 3 of 12 test cases failed (4 of 38 assertions failed)]
[End of group '~dummy'. 3 of 12 test cases failed (4 of 38 assertions failed)]
[Testing aborted. 3 of 12 test cases failed (4 of 38 assertions failed)]
[Testing completed. 3 of 12 test cases failed (4 of 38 assertions failed)]
<testsuites>
<testsuite name="~dummy" errors="8" failures="76" tests="607" hostname="tbd" time="tbd" timestamp="tbd">