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.
This commit is contained in:
Thiago Marcos P. Santos
2015-06-25 17:09:21 +03:00
parent 07086981fe
commit 7a30a0d316

View File

@@ -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());