From 31c23b9489c268b0536d35a4fb3a9da3d10e2b97 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Mon, 23 Jan 2017 17:44:55 +0000 Subject: [PATCH] Added [!nonportable] tag --- docs/test-cases-and-sections.md | 2 ++ include/internal/catch_test_case_info.h | 3 ++- include/internal/catch_test_case_info.hpp | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/test-cases-and-sections.md b/docs/test-cases-and-sections.md index f84cbfb..809935b 100644 --- a/docs/test-cases-and-sections.md +++ b/docs/test-cases-and-sections.md @@ -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. +* `[!nonportable]` - Indicates that behaviour may vary between platforms or compilers. + * `[#]` - 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]`. * `[@]` - tag aliases all begin with `@` (see below). diff --git a/include/internal/catch_test_case_info.h b/include/internal/catch_test_case_info.h index 6ab1f37..b821abd 100644 --- a/include/internal/catch_test_case_info.h +++ b/include/internal/catch_test_case_info.h @@ -29,7 +29,8 @@ namespace Catch { IsHidden = 1 << 1, ShouldFail = 1 << 2, MayFail = 1 << 3, - Throws = 1 << 4 + Throws = 1 << 4, + NonPortable = 1 << 5 }; TestCaseInfo( std::string const& _name, diff --git a/include/internal/catch_test_case_info.hpp b/include/internal/catch_test_case_info.hpp index 90f5341..8735527 100644 --- a/include/internal/catch_test_case_info.hpp +++ b/include/internal/catch_test_case_info.hpp @@ -26,6 +26,8 @@ namespace Catch { return TestCaseInfo::ShouldFail; else if( tag == "!mayfail" ) return TestCaseInfo::MayFail; + else if( tag == "!nonportable" ) + return TestCaseInfo::NonPortable; else return TestCaseInfo::None; }