Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Be more strict on escaping at the test regex
Browse files Browse the repository at this point in the history
Apparently libc++ is more strict about escaping
than libstdc++.

Also, restrict the set of tiles we expect to the
only possible tiles.
  • Loading branch information
tmpsantos committed Jun 25, 2015
1 parent 0708698 commit 7a30a0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/style/resource_loading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand All @@ -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());
Expand Down

0 comments on commit 7a30a0d

Please sign in to comment.