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