Added [!mayfail] tag to indicate test case that can fail without failing the suite.

Overhauled the summary report (including the expected failure count)
This commit is contained in:
Phil Nash 2014-07-03 08:09:57 +01:00
parent 05e42cb65c
commit 9c1f9a8f9a
15 changed files with 390 additions and 238 deletions

View file

@ -24,15 +24,27 @@ namespace Catch {
struct ITestCase;
struct TestCaseInfo {
enum SpecialProperties{
None = 0,
IsHidden = 1 << 1,
ShouldFail = 1 << 2,
MayFail = 1 << 3,
Throws = 1 << 4
};
TestCaseInfo( std::string const& _name,
std::string const& _className,
std::string const& _description,
std::set<std::string> const& _tags,
bool _isHidden,
SourceLineInfo const& _lineInfo );
TestCaseInfo( TestCaseInfo const& other );
bool isHidden() const;
bool throws() const;
bool okToFail() const;
bool expectedToFail() const;
std::string name;
std::string className;
std::string description;
@ -40,8 +52,7 @@ namespace Catch {
std::set<std::string> lcaseTags;
std::string tagsAsString;
SourceLineInfo lineInfo;
bool isHidden;
bool throws;
SpecialProperties properties;
};
class TestCase : public TestCaseInfo {
@ -56,9 +67,6 @@ namespace Catch {
TestCaseInfo const& getTestCaseInfo() const;
bool isHidden() const;
bool throws() const;
void swap( TestCase& other );
bool operator == ( TestCase const& other ) const;
bool operator < ( TestCase const& other ) const;