summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-06-25 17:09:21 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-06-25 18:13:01 +0300
commit7a30a0d316501d8dd606ece0ab220e7ec2e64088 (patch)
tree20da3039db4f32c8b918f10c01a4ab7d1318d746
parent07086981fe18aebb04eb55c24286b06eb2bf4c6f (diff)
downloadqtlocation-mapboxgl-7a30a0d316501d8dd606ece0ab220e7ec2e64088.tar.gz
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.
-rw-r--r--test/style/resource_loading.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/style/resource_loading.cpp b/test/style/resource_loading.cpp
index 85fc6fc6da..6c5eb51bd4 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());