Skip to content

Commit

Permalink
Add an explicit test for array assertion fallback behavior
Browse files Browse the repository at this point in the history
This is tested implicitly via legacy function conversion tests added in #7095, but it's proving difficult to get those passing on native, and we should test this in isolation anyway.
  • Loading branch information
jfirebaugh committed Sep 11, 2018
1 parent 64c2538 commit 36f6c47
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/integration/expression-tests/array/default-value/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"expression": ["array", "number", null, ["get", "x"], ["literal", [0]]],
"inputs": [
[{}, {}],
[{}, {"properties": {"x": []}}],
[{}, {"properties": {"x": ["1"]}}]
],
"expected": {
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "array<number>"
},
"outputs": [
[0],
[],
[0]
],
"serialized": ["array", "number", null, ["get", "x"], ["literal", [0]]]
}
}

0 comments on commit 36f6c47

Please sign in to comment.