Skip to content

Commit d20e672

Browse files
authored
Clean up expression tests (#1182)
* run integration test update script * remove duplicate array tests * rename `invalid` test to `invalid-arg` * combine slice expression test files * split `slice/invalid-inputs` into separate tests for each parameter * test slice expression against similar cases for arrays and strings * remove tests duplicated by `match/labels-mixed-1` * remove test duplicated by `match/label-strings` * rename `match/mismatch-label-2` to align with other tests * remove test duplicated by `interpolate/exponential-color` * align `linear-color` tests between `interpolate{,-hcl,-lab}`
1 parent 2465dfd commit d20e672

File tree

37 files changed

+705
-989
lines changed

37 files changed

+705
-989
lines changed

test/integration/expression/tests/array/item-type-and-length/test.json

Lines changed: 0 additions & 66 deletions
This file was deleted.

test/integration/expression/tests/array/item-type/test.json

Lines changed: 0 additions & 74 deletions
This file was deleted.

test/integration/expression/tests/feature-state/basic/test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
],
1414
[
1515
{},
16-
{
16+
{
1717
"featureState": {}
1818
}
1919
],
2020
[
2121
{},
22-
{
22+
{
2323
"featureState": {
2424
"x": 1
2525
}

test/integration/expression/tests/feature-state/expression-arg/test.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,21 @@
66
[
77
"at",
88
1,
9-
["literal", ["e", "x", "e"]]
9+
[
10+
"literal",
11+
[
12+
"e",
13+
"x",
14+
"e"
15+
]
16+
]
1017
]
1118
]
1219
],
1320
"inputs": [
1421
[
1522
{},
16-
{
23+
{
1724
"featureState": {
1825
"x": 1
1926
}

test/integration/expression/tests/geometry-type/basic/test.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@
88
{
99
"geometry": {
1010
"type": "LineString",
11-
"coordinates":
12-
[[0, 0], [10, 0]]
11+
"coordinates": [
12+
[
13+
0,
14+
0
15+
],
16+
[
17+
10,
18+
0
19+
]
20+
]
1321
}
1422
}
1523
]
@@ -25,4 +33,4 @@
2533
"LineString"
2634
]
2735
}
28-
}
36+
}

test/integration/expression/tests/global-state/basic/test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
{}
1313
],
1414
[
15-
{
15+
{
1616
"globalState": {}
1717
},
1818
{}
1919
],
2020
[
21-
{
21+
{
2222
"globalState": {
2323
"x": 1
2424
}

test/integration/expression/tests/interpolate/linear-color-2/test.json renamed to test/integration/expression/tests/interpolate-hcl/linear-color/test.json

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
{
2-
"propertySpec": {
3-
"type": "color",
4-
"property-type": "data-driven",
5-
"expression": {
6-
"interpolated": true,
7-
"parameters": [
8-
"feature"
9-
]
10-
}
11-
},
122
"expression": [
13-
"interpolate",
3+
"interpolate-hcl",
144
[
155
"linear"
166
],
@@ -106,27 +96,27 @@
10696
1
10797
],
10898
[
109-
0.6,
99+
1,
110100
0,
111-
0.4,
101+
0.425112,
112102
1
113103
],
114104
[
115-
0.36,
105+
0.6,
116106
0,
117-
0.24,
107+
0.255067,
118108
0.6
119109
],
120110
[
121-
0.36,
111+
0.6,
122112
0,
123-
0.24,
113+
0.255067,
124114
0.6
125115
],
126116
[
127-
0.36,
117+
0.6,
128118
0,
129-
0.24,
119+
0.255067,
130120
0.6
131121
],
132122
[

test/integration/expression/tests/interpolate-hcl/linear/test.json

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)