mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Fixed sticky INFO (which persisted across TEST_CASEs) from #152 and generated build 18
This commit is contained in:
parent
fb944f2b6b
commit
d768b1b7f9
2
README
2
README
@ -1,4 +1,4 @@
|
|||||||
CATCH v0.9 build 17 (integration branch)
|
CATCH v0.9 build 18 (integration branch)
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|
||||||
CATCH is an automated test framework for C, C++ and Objective-C.
|
CATCH is an automated test framework for C, C++ and Objective-C.
|
||||||
|
@ -267,6 +267,7 @@ namespace Catch {
|
|||||||
try {
|
try {
|
||||||
m_lastAssertionInfo = AssertionInfo( "TEST_CASE", m_runningTest->getTestCase().getTestCaseInfo().lineInfo, "", ResultDisposition::Normal );
|
m_lastAssertionInfo = AssertionInfo( "TEST_CASE", m_runningTest->getTestCase().getTestCaseInfo().lineInfo, "", ResultDisposition::Normal );
|
||||||
m_runningTest->reset();
|
m_runningTest->reset();
|
||||||
|
|
||||||
if( m_reporter->getPreferences().shouldRedirectStdOut ) {
|
if( m_reporter->getPreferences().shouldRedirectStdOut ) {
|
||||||
StreamRedirect coutRedir( std::cout, redirectedCout );
|
StreamRedirect coutRedir( std::cout, redirectedCout );
|
||||||
StreamRedirect cerrRedir( std::cerr, redirectedCerr );
|
StreamRedirect cerrRedir( std::cerr, redirectedCerr );
|
||||||
@ -285,6 +286,7 @@ namespace Catch {
|
|||||||
exResult << translateActiveException();
|
exResult << translateActiveException();
|
||||||
actOnCurrentResult( exResult.buildResult( m_lastAssertionInfo ) );
|
actOnCurrentResult( exResult.buildResult( m_lastAssertionInfo ) );
|
||||||
}
|
}
|
||||||
|
m_messages.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
// These numbers are maintained by a script
|
// These numbers are maintained by a script
|
||||||
Version libraryVersion( 0, 9, 17, "integration" );
|
Version libraryVersion( 0, 9, 18, "integration" );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
|
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
|
||||||
|
@ -2228,6 +2228,22 @@ MessageTests.cpp:92:
|
|||||||
|
|
||||||
No assertions in test case, './succeeding/nofail'
|
No assertions in test case, './succeeding/nofail'
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
just info
|
||||||
|
...............................................................................
|
||||||
|
|
||||||
|
|
||||||
|
No assertions in test case, 'just info'
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
just failure
|
||||||
|
...............................................................................
|
||||||
|
|
||||||
|
FAILED:
|
||||||
|
explicitly with message:
|
||||||
|
Previous info should not be seen
|
||||||
|
MessageTests.cpp:101:
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
./succeeding/Misc/Sections
|
./succeeding/Misc/Sections
|
||||||
s1
|
s1
|
||||||
@ -4235,7 +4251,7 @@ with expansion:
|
|||||||
BDDTests.cpp:29:
|
BDDTests.cpp:29:
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
96 test cases - 45 failed (610 assertions - 102 failed)
|
98 test cases - 47 failed (612 assertions - 104 failed)
|
||||||
|
|
||||||
|
|
||||||
CatchSelfTest is a CATCH v0.9 b17 (integration) host application.
|
CatchSelfTest is a CATCH v0.9 b17 (integration) host application.
|
||||||
@ -4517,7 +4533,7 @@ ConditionTests.cpp:72:
|
|||||||
12 test cases - 3 failed (38 assertions - 4 failed)
|
12 test cases - 3 failed (38 assertions - 4 failed)
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="~dummy" errors="8" failures="77" tests="610" hostname="tbd" time="tbd" timestamp="tbd">
|
<testsuite name="~dummy" errors="8" failures="78" tests="612" hostname="tbd" time="tbd" timestamp="tbd">
|
||||||
<testcase classname="global" name="./succeeding/Approx/simple" time="tbd"/>
|
<testcase classname="global" name="./succeeding/Approx/simple" time="tbd"/>
|
||||||
<testcase classname="global" name="./succeeding/Approx/epsilon" time="tbd"/>
|
<testcase classname="global" name="./succeeding/Approx/epsilon" time="tbd"/>
|
||||||
<testcase classname="global" name="./succeeding/Approx/float" time="tbd"/>
|
<testcase classname="global" name="./succeeding/Approx/float" time="tbd"/>
|
||||||
@ -4783,6 +4799,12 @@ MessageTests.cpp:86
|
|||||||
MessageTests.cpp:92
|
MessageTests.cpp:92
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
|
<testcase classname="global" name="just info" time="tbd"/>
|
||||||
|
<testcase classname="global" name="just failure" time="tbd">
|
||||||
|
<failure type="FAIL">
|
||||||
|
MessageTests.cpp:101
|
||||||
|
</failure>
|
||||||
|
</testcase>
|
||||||
<testcase classname="global" name="./succeeding/Misc/Sections" time="tbd"/>
|
<testcase classname="global" name="./succeeding/Misc/Sections" time="tbd"/>
|
||||||
<testcase classname="global" name="./succeeding/Misc/Sections/nested" time="tbd"/>
|
<testcase classname="global" name="./succeeding/Misc/Sections/nested" time="tbd"/>
|
||||||
<testcase classname="global" name="./mixed/Misc/Sections/nested2" time="tbd">
|
<testcase classname="global" name="./mixed/Misc/Sections/nested2" time="tbd">
|
||||||
@ -7767,6 +7789,15 @@ MessageTests.cpp" line="92">
|
|||||||
</Expression>
|
</Expression>
|
||||||
<OverallResult success="false"/>
|
<OverallResult success="false"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
|
<TestCase name="just info">
|
||||||
|
<OverallResult success="true"/>
|
||||||
|
</TestCase>
|
||||||
|
<TestCase name="just failure">
|
||||||
|
<Failure>
|
||||||
|
Previous info should not be seen
|
||||||
|
</Failure>
|
||||||
|
<OverallResult success="false"/>
|
||||||
|
</TestCase>
|
||||||
<TestCase name="./succeeding/Misc/Sections">
|
<TestCase name="./succeeding/Misc/Sections">
|
||||||
<Section name="s1" description="doesn't equal">
|
<Section name="s1" description="doesn't equal">
|
||||||
MiscTests.cpp" line="25">
|
MiscTests.cpp" line="25">
|
||||||
@ -9754,9 +9785,9 @@ BDDTests.cpp" line="29">
|
|||||||
</Section>
|
</Section>
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<OverallResults successes="508" failures="102"/>
|
<OverallResults successes="508" failures="104"/>
|
||||||
</Group>
|
</Group>
|
||||||
<OverallResults successes="508" failures="102"/>
|
<OverallResults successes="508" failures="104"/>
|
||||||
</Catch>
|
</Catch>
|
||||||
[Started testing: CatchSelfTest]
|
[Started testing: CatchSelfTest]
|
||||||
[Started group: '~dummy']
|
[Started group: '~dummy']
|
||||||
@ -10262,6 +10293,16 @@ No assertions in test case, './succeeding/nofail'
|
|||||||
|
|
||||||
[Finished: './succeeding/nofail' 1 test case failed (1 assertion failed)]
|
[Finished: './succeeding/nofail' 1 test case failed (1 assertion failed)]
|
||||||
|
|
||||||
|
[Running: just info]
|
||||||
|
|
||||||
|
No assertions in test case, 'just info'
|
||||||
|
|
||||||
|
[Finished: 'just info' 1 test case failed (1 assertion failed)]
|
||||||
|
|
||||||
|
[Running: just failure]
|
||||||
|
MessageTests.cpp:101: failed with message: 'Previous info should not be seen'
|
||||||
|
[Finished: 'just failure' 1 test case failed (1 assertion failed)]
|
||||||
|
|
||||||
[Running: ./succeeding/Misc/Sections]
|
[Running: ./succeeding/Misc/Sections]
|
||||||
[Started section: 's1']
|
[Started section: 's1']
|
||||||
MiscTests.cpp:25: a != b succeeded for: 1 != 2
|
MiscTests.cpp:25: a != b succeeded for: 1 != 2
|
||||||
@ -11084,10 +11125,10 @@ BDDTests.cpp:29: itDoesThis() succeeded for: true
|
|||||||
[End of section: ' Given: This stuff exists' 1 assertion passed]
|
[End of section: ' Given: This stuff exists' 1 assertion passed]
|
||||||
|
|
||||||
[Finished: 'Scenario: Do that thing with the thing' All tests passed (1 assertion in 1 test case)]
|
[Finished: 'Scenario: Do that thing with the thing' All tests passed (1 assertion in 1 test case)]
|
||||||
[End of group: '~dummy'. 45 of 96 test cases failed (102 of 610 assertions failed)]
|
[End of group: '~dummy'. 47 of 98 test cases failed (104 of 612 assertions failed)]
|
||||||
|
|
||||||
|
|
||||||
[Testing completed. 45 of 96 test cases failed (102 of 610 assertions failed)]
|
[Testing completed. 47 of 98 test cases failed (104 of 612 assertions failed)]
|
||||||
|
|
||||||
[Started testing: CatchSelfTest]
|
[Started testing: CatchSelfTest]
|
||||||
[Started group: '~dummy']
|
[Started group: '~dummy']
|
||||||
|
@ -91,3 +91,12 @@ TEST_CASE( "./succeeding/nofail", "The NO_FAIL macro reports a failure but does
|
|||||||
{
|
{
|
||||||
CHECK_NOFAIL( 1 == 2 );
|
CHECK_NOFAIL( 1 == 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE( "just info", "[info][isolated info]" )
|
||||||
|
{
|
||||||
|
INFO( "this should never be seen" );
|
||||||
|
}
|
||||||
|
TEST_CASE( "just failure", "[fail][isolated info]" )
|
||||||
|
{
|
||||||
|
FAIL( "Previous info should not be seen" );
|
||||||
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* CATCH v0.9 build 17 (integration branch)
|
* CATCH v0.9 build 18 (integration branch)
|
||||||
* Generated: 2013-02-02 20:37:06.007152
|
* Generated: 2013-02-04 00:03:53.198397
|
||||||
* ----------------------------------------------------------
|
* ----------------------------------------------------------
|
||||||
* This file has been merged from multiple headers. Please don't edit it directly
|
* This file has been merged from multiple headers. Please don't edit it directly
|
||||||
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
|
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
|
||||||
@ -4594,6 +4594,7 @@ namespace Catch {
|
|||||||
try {
|
try {
|
||||||
m_lastAssertionInfo = AssertionInfo( "TEST_CASE", m_runningTest->getTestCase().getTestCaseInfo().lineInfo, "", ResultDisposition::Normal );
|
m_lastAssertionInfo = AssertionInfo( "TEST_CASE", m_runningTest->getTestCase().getTestCaseInfo().lineInfo, "", ResultDisposition::Normal );
|
||||||
m_runningTest->reset();
|
m_runningTest->reset();
|
||||||
|
|
||||||
if( m_reporter->getPreferences().shouldRedirectStdOut ) {
|
if( m_reporter->getPreferences().shouldRedirectStdOut ) {
|
||||||
StreamRedirect coutRedir( std::cout, redirectedCout );
|
StreamRedirect coutRedir( std::cout, redirectedCout );
|
||||||
StreamRedirect cerrRedir( std::cerr, redirectedCerr );
|
StreamRedirect cerrRedir( std::cerr, redirectedCerr );
|
||||||
@ -4612,6 +4613,7 @@ namespace Catch {
|
|||||||
exResult << translateActiveException();
|
exResult << translateActiveException();
|
||||||
actOnCurrentResult( exResult.buildResult( m_lastAssertionInfo ) );
|
actOnCurrentResult( exResult.buildResult( m_lastAssertionInfo ) );
|
||||||
}
|
}
|
||||||
|
m_messages.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -5814,7 +5816,7 @@ namespace Catch {
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
// These numbers are maintained by a script
|
// These numbers are maintained by a script
|
||||||
Version libraryVersion( 0, 9, 17, "integration" );
|
Version libraryVersion( 0, 9, 18, "integration" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// #included from: catch_line_wrap.hpp
|
// #included from: catch_line_wrap.hpp
|
||||||
|
Loading…
Reference in New Issue
Block a user