mirror of
https://github.com/catchorg/Catch2.git
synced 2025-10-23 18:15:40 +02:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user