Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Added [!nonportable] tag

Commit
31c23b9489c268b0536d35a4fb3a9da3d10e2b97
Author
Phil Nash ·
Parents
f347611403b3

Files · Download .tar.gz

Changes

 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 f84cbfbf..809935b6 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.
+
 * `[#<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).
diff --git a/include/internal/catch_test_case_info.h b/include/internal/catch_test_case_info.h
index 6ab1f375..b821abd3 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 90f53411..87355271 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;
     }