Added [!nonportable] tag

This commit is contained in:
Phil Nash 2017-01-23 17:44:55 +00:00
parent f347611403
commit 31c23b9489
3 changed files with 6 additions and 1 deletions

View File

@ -42,6 +42,8 @@ All tag names beginning with non-alphanumeric characters are reserved by Catch.
* `[!mayfail]` - doesn't fail the test if any given assertion fails (but still reports it). This can be useful to flag a work-in-progress, or a known issue that you don't want to immediately fix but still want to track in the your tests. * `[!mayfail]` - doesn't fail the test if any given assertion fails (but still reports it). This can be useful to flag a work-in-progress, or a known issue that you don't want to immediately fix but still want to track in the your tests.
* `[!nonportable]` - Indicates that behaviour may vary between platforms or compilers.
* `[#<filename>]` - running with `-#` or `--filenames-as-tags` causes Catch to add the filename, prefixed with `#` (and with any extension stripped) as a tag. e.g. tests in testfile.cpp would all be tagged `[#testfile]`. * `[#<filename>]` - running with `-#` or `--filenames-as-tags` causes Catch to add the filename, prefixed with `#` (and with any extension stripped) as a tag. e.g. tests in testfile.cpp would all be tagged `[#testfile]`.
* `[@<alias>]` - tag aliases all begin with `@` (see below). * `[@<alias>]` - tag aliases all begin with `@` (see below).

View File

@ -29,7 +29,8 @@ namespace Catch {
IsHidden = 1 << 1, IsHidden = 1 << 1,
ShouldFail = 1 << 2, ShouldFail = 1 << 2,
MayFail = 1 << 3, MayFail = 1 << 3,
Throws = 1 << 4 Throws = 1 << 4,
NonPortable = 1 << 5
}; };
TestCaseInfo( std::string const& _name, TestCaseInfo( std::string const& _name,

View File

@ -26,6 +26,8 @@ namespace Catch {
return TestCaseInfo::ShouldFail; return TestCaseInfo::ShouldFail;
else if( tag == "!mayfail" ) else if( tag == "!mayfail" )
return TestCaseInfo::MayFail; return TestCaseInfo::MayFail;
else if( tag == "!nonportable" )
return TestCaseInfo::NonPortable;
else else
return TestCaseInfo::None; return TestCaseInfo::None;
} }