Files
MapLibreParticleLab/metrics/integration/expression-tests/legacy/identity/number/test.json
2023-03-25 14:46:49 +01:00

32 lines
809 B
JSON

{
"expression": {"type": "identity", "property": "p"},
"inputs": [
[{}, {"properties": {}}],
[{}, {"properties": {"p": 0}}],
[{}, {"properties": {"p": 1}}],
[{}, {"properties": {"p": "wrong type"}}]
],
"propertySpec": {
"type": "number",
"property-type": "data-driven",
"expression": {"interpolated": false, "parameters": ["zoom", "feature"]}
},
"expected": {
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "number"
},
"outputs": [
{"error": "Expected value to be of type number, but found null instead."},
0,
1,
{
"error": "Expected value to be of type number, but found string instead."
}
],
"serialized": ["number", ["get", "p"]]
}
}