Matchers macro uses Catch::Matchers namespace internally - so it doesn't have to be declared with "using" first

This commit is contained in:
Phil Nash
2012-05-24 08:29:03 +01:00
parent 1c98fc98ef
commit 7035b55832
5 changed files with 13 additions and 7 deletions

View File

@@ -247,8 +247,6 @@ inline const char* testStringForMatching()
return "this string contains 'abc' as a substring";
}
using namespace Catch::Matchers;
TEST_CASE("./succeeding/matchers", "")
{
REQUIRE_THAT( testStringForMatching(), Contains( "string" ) );
@@ -272,3 +270,13 @@ TEST_CASE("./failing/matchers/EndsWith", "")
{
CHECK_THAT( testStringForMatching(), EndsWith( "this" ) );
}
TEST_CASE("./failing/matchers/Equals", "")
{
CHECK_THAT( testStringForMatching(), Equals( "something else" ) );
}
TEST_CASE("./succeeding/matchers/Equals", "")
{
CHECK_THAT( testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) );
}