summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/compare_images.js8
-rw-r--r--src/style/style_parser.cpp3
-rw-r--r--test/fixtures/styles/0.style.json8
-rw-r--r--test/fixtures/styles/1.style.json8
4 files changed, 15 insertions, 12 deletions
diff --git a/scripts/compare_images.js b/scripts/compare_images.js
index 3d33d4b509..2583157567 100755
--- a/scripts/compare_images.js
+++ b/scripts/compare_images.js
@@ -23,6 +23,7 @@ var html =
'</tr>\n';
var exitCode = 0;
+var failures = 0;
processFiles();
@@ -66,6 +67,7 @@ function writeResult(base, info, error, difference) {
if (exitCode < 1) {
exitCode = 1;
}
+ failures++;
}
html +=
@@ -93,6 +95,12 @@ function done() {
html += "</table>\n";
fs.writeFileSync(path.join(base_dir, 'index.html'), html);
+ console.warn('Results at: ' + path.join(base_dir, 'index.html'));
+ if (failures) {
+ console.warn('\x1B[1m\x1B[31m' + failures + ' ' + (failures == 1 ? 'image doesn\'t' : 'images don\'t') + ' match\x1B[39m\x1B[22m');
+ } else {
+ console.warn('\x1B[1m\x1B[32mAll images match\x1B[39m\x1B[22m');
+ }
process.exit(exitCode);
} \ No newline at end of file
diff --git a/src/style/style_parser.cpp b/src/style/style_parser.cpp
index 8f6abf3bc8..1821a66bd6 100644
--- a/src/style/style_parser.cpp
+++ b/src/style/style_parser.cpp
@@ -917,6 +917,9 @@ void StyleParser::parseRender(JSVal value, std::shared_ptr<StyleLayer> &layer) {
}
parseRenderProperty(value, render.translate_anchor, "text-translate-anchor", parseTranslateAnchorType);
} break;
+ default:
+ // There are no render properties for these layer types.
+ break;
}
}
diff --git a/test/fixtures/styles/0.style.json b/test/fixtures/styles/0.style.json
index d5994b82cc..c37774b662 100644
--- a/test/fixtures/styles/0.style.json
+++ b/test/fixtures/styles/0.style.json
@@ -11,9 +11,7 @@
"layers": [
{
"id": "background",
- "render": {
- "type": "background"
- },
+ "type": "background",
"style": {
"background-color": "red"
}
@@ -22,9 +20,7 @@
"id": "water",
"source": "mapbox",
"source-layer": "water",
- "render": {
- "type": "fill"
- },
+ "type": "fill",
"style": {
"fill-color": "blue",
"fill-antialias": false
diff --git a/test/fixtures/styles/1.style.json b/test/fixtures/styles/1.style.json
index 0d0286b277..3165ec5b9f 100644
--- a/test/fixtures/styles/1.style.json
+++ b/test/fixtures/styles/1.style.json
@@ -11,9 +11,7 @@
"layers": [
{
"id": "background",
- "render": {
- "type": "background"
- },
+ "type": "background",
"style": {
"background-color": "red"
}
@@ -22,9 +20,7 @@
"id": "water",
"source": "mapbox",
"source-layer": "water",
- "render": {
- "type": "fill"
- },
+ "type": "fill",
"style": {
"fill-color": "blue"
}