Skip to content

Commit

Permalink
Simplify {icon,text}-size tests and ensure they test interpolation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh authored Feb 24, 2017
1 parent 882a461 commit 3a07c35
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 216 deletions.
Binary file modified test/integration/render-tests/icon-size/default/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 14 additions & 34 deletions test/integration/render-tests/icon-size/default/style.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,31 @@
"version": 8,
"metadata": {
"test": {
"height": 256
"width": 64,
"height": 64
}
},
"center": [
13.418056,
52.499167
],
"zoom": 14,
"sources": {
"mapbox": {
"type": "vector",
"maxzoom": 14,
"tiles": [
"local://tiles/{z}-{x}-{y}.mvt"
]
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"sprite": "local://sprites/emerald",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "icon-default",
"id": "symbol",
"type": "symbol",
"source": "mapbox",
"source-layer": "poi_label",
"filter": [
"==",
"maki",
"restaurant"
],
"source": "geojson",
"layout": {
"symbol-placement": "point",
"icon-allow-overlap": true,
"icon-ignore-placement": true,
"icon-image": "generic_icon"
},
"paint": {
"icon-opacity": 1
}
}
]
}
}
Binary file modified test/integration/render-tests/icon-size/function/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 19 additions & 38 deletions test/integration/render-tests/icon-size/function/style.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,44 @@
"version": 8,
"metadata": {
"test": {
"height": 256
"width": 64,
"height": 64
}
},
"center": [
13.418056,
52.499167
],
"zoom": 14,
"zoom": 0.5,
"sources": {
"mapbox": {
"type": "vector",
"maxzoom": 14,
"tiles": [
"local://tiles/{z}-{x}-{y}.mvt"
]
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"sprite": "local://sprites/emerald",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "icon-function",
"id": "symbol",
"type": "symbol",
"source": "mapbox",
"source-layer": "poi_label",
"filter": [
"==",
"maki",
"restaurant"
],
"source": "geojson",
"layout": {
"symbol-placement": "point",
"icon-allow-overlap": true,
"icon-ignore-placement": true,
"icon-image": "generic_icon",
"icon-size": {
"stops": [
[
16,
4
0,
1
],
[
17,
5
1,
2
]
]
}
},
"paint": {
"icon-opacity": 1
}
}
]
}
}
Binary file modified test/integration/render-tests/icon-size/literal/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 14 additions & 34 deletions test/integration/render-tests/icon-size/literal/style.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,32 @@
"version": 8,
"metadata": {
"test": {
"height": 256
"width": 64,
"height": 64
}
},
"center": [
13.418056,
52.499167
],
"zoom": 14,
"sources": {
"mapbox": {
"type": "vector",
"maxzoom": 14,
"tiles": [
"local://tiles/{z}-{x}-{y}.mvt"
]
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"sprite": "local://sprites/emerald",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "icon-literal",
"id": "symbol",
"type": "symbol",
"source": "mapbox",
"source-layer": "poi_label",
"filter": [
"==",
"maki",
"restaurant"
],
"source": "geojson",
"layout": {
"symbol-placement": "point",
"icon-allow-overlap": true,
"icon-ignore-placement": true,
"icon-image": "generic_icon",
"icon-size": 2
},
"paint": {
"icon-opacity": 1
}
}
]
}
}
Binary file modified test/integration/render-tests/text-size/default/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 15 additions & 35 deletions test/integration/render-tests/text-size/default/style.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,35 @@
"version": 8,
"metadata": {
"test": {
"height": 256
"width": 64,
"height": 64
}
},
"center": [
13.418056,
52.499167
],
"zoom": 14,
"sources": {
"mapbox": {
"type": "vector",
"maxzoom": 14,
"tiles": [
"local://tiles/{z}-{x}-{y}.mvt"
]
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "text",
"id": "symbol",
"type": "symbol",
"source": "mapbox",
"source-layer": "poi_label",
"filter": [
"==",
"maki",
"restaurant"
],
"source": "geojson",
"layout": {
"symbol-placement": "point",
"text-allow-overlap": true,
"text-ignore-placement": true,
"text-field": "Test",
"text-field": "ABC",
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
]
},
"paint": {
"text-opacity": 1
}
}
]
}
}
Binary file modified test/integration/render-tests/text-size/function/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 20 additions & 39 deletions test/integration/render-tests/text-size/function/style.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,48 @@
"version": 8,
"metadata": {
"test": {
"height": 256
"width": 64,
"height": 64
}
},
"center": [
13.418056,
52.499167
],
"zoom": 14,
"zoom": 0.5,
"sources": {
"mapbox": {
"type": "vector",
"maxzoom": 14,
"tiles": [
"local://tiles/{z}-{x}-{y}.mvt"
]
"geojson": {
"type": "geojson",
"data": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "text-function",
"id": "symbol",
"type": "symbol",
"source": "mapbox",
"source-layer": "poi_label",
"filter": [
"==",
"maki",
"restaurant"
],
"source": "geojson",
"layout": {
"symbol-placement": "point",
"text-allow-overlap": true,
"text-ignore-placement": true,
"text-field": "Test",
"text-field": "ABC",
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
],
"text-size": {
"stops": [
[
16,
14
0,
12
],
[
17,
16
1,
24
]
]
}
},
"paint": {
"text-opacity": 1
}
}
]
}
}
Binary file modified test/integration/render-tests/text-size/literal/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3a07c35

Please sign in to comment.