diff options
| author | Phil Nash | 2014-05-16 06:50:00 +0100 |
|---|---|---|
| committer | Phil Nash | 2014-05-16 06:50:00 +0100 |
| commit | f8cff10ff6cd70bc7fffb469643fe5ee999f3c69 (patch) | |
| tree | 90b65752dfd521767ddb106dd4b004fdf725a9a9 /projects/SelfTest/TestMain.cpp | |
| parent | ad4489043b1d45476e0bdcfc046f4b8b15e1cbce (diff) | |
| download | catch3-f8cff10ff6cd70bc7fffb469643fe5ee999f3c69.tar.gz | |
First cut of new test spec parser code
Diffstat (limited to 'projects/SelfTest/TestMain.cpp')
| -rw-r--r-- | projects/SelfTest/TestMain.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp index b1468cbc..461f965d 100644 --- a/projects/SelfTest/TestMain.cpp +++ b/projects/SelfTest/TestMain.cpp @@ -251,7 +251,8 @@ TEST_CASE( "selftest/tags", "[tags]" ) { std::string p3 = "[one][two]"; std::string p4 = "[one][two],[three]"; std::string p5 = "[one][two]~[.],[three]"; - + std::string p6 = "[one][two]exclude:[.],[three]"; + SECTION( "single [one] tag", "" ) { Catch::TestCase oneTag = makeTestCase( NULL, "", "test", "[one]", CATCH_INTERNAL_LINEINFO ); @@ -264,6 +265,7 @@ TEST_CASE( "selftest/tags", "[tags]" ) { CHECK( oneTag.matchesTags( p3 ) == false ); CHECK( oneTag.matchesTags( p4 ) == false ); CHECK( oneTag.matchesTags( p5 ) == false ); + CHECK( oneTag.matchesTags( p6 ) == false ); } SECTION( "single [two] tag", "" ) { @@ -278,6 +280,7 @@ TEST_CASE( "selftest/tags", "[tags]" ) { CHECK( oneTag.matchesTags( p3 ) == false ); CHECK( oneTag.matchesTags( p4 ) == false ); CHECK( oneTag.matchesTags( p5 ) == false ); + CHECK( oneTag.matchesTags( p6 ) == false ); } SECTION( "two tags", "" ) { @@ -295,6 +298,7 @@ TEST_CASE( "selftest/tags", "[tags]" ) { CHECK( twoTags.matchesTags( p3 ) == true ); CHECK( twoTags.matchesTags( p4 ) == true ); CHECK( twoTags.matchesTags( p5 ) == true ); + CHECK( twoTags.matchesTags( p6 ) == true ); } SECTION( "complex", "" ) { CHECK( fakeTestCase( "test", "[one][.]" ).matchesTags( p1 ) ); @@ -302,8 +306,10 @@ TEST_CASE( "selftest/tags", "[tags]" ) { CHECK( fakeTestCase( "test", "[three]" ).matchesTags( p4 ) ); CHECK( fakeTestCase( "test", "[three]" ).matchesTags( p5 ) ); CHECK( fakeTestCase( "test", "[three]" ).matchesTags( "[three]~[one]" ) ); + CHECK( fakeTestCase( "test", "[three]" ).matchesTags( "[three]exclude:[one]" ) ); CHECK( fakeTestCase( "test", "[unit][not_apple]" ).matchesTags( "[unit]" ) ); CHECK_FALSE( fakeTestCase( "test", "[unit][not_apple]" ).matchesTags( "[unit]~[not_apple]" ) ); + CHECK_FALSE( fakeTestCase( "test", "[unit][not_apple]" ).matchesTags( "[unit]exclude:[not_apple]" ) ); } SECTION( "one tag with characters either side", "" ) { @@ -499,7 +505,7 @@ private: }; // !TBD: This will be folded into Text class -TEST_CASE( "Strings can be rendered with colour", "[colour]" ) { +TEST_CASE( "Strings can be rendered with colour", "[colour][.]" ) { { ColourString cs( "hello" ); |