Files
MapLibreParticleLab/metrics/integration/expression-tests/match/label-boolean/test.json
2023-03-25 14:46:49 +01:00

26 lines
525 B
JSON

{
"expression": [
"match",
["boolean", ["get", "x"]],
true,
"match",
"otherwise"
],
"inputs": [
[{}, {"properties": {"x": true}}],
[{}, {"properties": {"x": false}}],
[{}, {"properties": {"x": "true"}}],
[{}, {"properties": {"x": 1}}],
[{}, {"properties": {"x": null}}],
[{}, {"properties": {}}]
],
"expected": {
"compiled": {
"result": "error",
"errors": [
{"key": "[2]", "error": "Branch labels must be numbers or strings."}
]
}
}
}