From 7a30a0d316501d8dd606ece0ab220e7ec2e64088 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Thu, 25 Jun 2015 17:09:21 +0300 Subject: [PATCH] Be more strict on escaping at the test regex Apparently libc++ is more strict about escaping than libstdc++. Also, restrict the set of tiles we expect to the only possible tiles. --- test/style/resource_loading.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/style/resource_loading.cpp b/test/style/resource_loading.cpp index 85fc6fc6d..6c5eb51bd 100644 --- a/test/style/resource_loading.cpp +++ b/test/style/resource_loading.cpp @@ -147,7 +147,7 @@ TEST_P(ResourceLoading, Success) { TEST_P(ResourceLoading, RequestFail) { std::stringstream message; - message << "Failed to load \\[test/fixtures/resources/" << GetParam() << "]: Failed by the test case"; + message << "Failed to load \\[test\\/fixtures\\/resources\\/" << GetParam() << "\\]\\: Failed by the test case"; runTestCase(MockFileSource::RequestFail, GetParam(), message.str()); } @@ -159,13 +159,13 @@ TEST_P(ResourceLoading, RequestWithCorruptedData) { message << "Failed to parse "; if (param == "vector.pbf") { - message << "\\[15/1638./1638.]: pbf unknown field type exception"; + message << "\\[15\\/1638(3|4)\\/1638(3|4)\\]\\: pbf unknown field type exception"; } else { - message << "\\[test/fixtures/resources/" << param << "]"; + message << "\\[test\\/fixtures\\/resources\\/" << param << "\\]"; } if (param.find("json") != std::string::npos) { - message << ": 0 - Expect either an object or array at root"; + message << "\\: 0 - Expect either an object or array at root"; } runTestCase(MockFileSource::RequestWithCorruptedData, GetParam(), message.str());