Supported expressions in variable value field

commit_hash:a341b70bacca741f0cb6ea2f600cc4794c8b36a4
This commit is contained in:
burstein
2025-05-15 03:55:51 +03:00
parent 01ec3d815d
commit d919b980ee
32 changed files with 344 additions and 83 deletions
@@ -180,6 +180,142 @@
"flutter"
]
},
{
"expression": "@{integer_var_with_expression}",
"expected": {
"type": "integer",
"value": 123
},
"variables": [
{
"name": "integer_var_with_expression",
"type": "integer",
"value": "@{123}"
}
],
"platforms": [
"ios"
]
},
{
"expression": "@{number_var_with_expression}",
"expected": {
"type": "number",
"value": 123.0
},
"variables": [
{
"name": "number_var_with_expression",
"type": "number",
"value": "@{123.0}"
}
],
"platforms": [
"ios"
]
},
{
"expression": "@{string_var_with_expression}",
"expected": {
"type": "string",
"value": "test string"
},
"variables": [
{
"name": "string_var_with_expression",
"type": "string",
"value": "@{'test string'}"
}
],
"platforms": [
"ios"
]
},
{
"expression": "@{boolean_var_with_expression}",
"expected": {
"type": "boolean",
"value": false
},
"variables": [
{
"name": "boolean_var_with_expression",
"type": "boolean",
"value": "@{true && false}"
}
],
"platforms": [
"ios"
]
},
{
"expression": "@{color_var_with_expression}",
"expected": {
"type": "color",
"value": "#FF0000"
},
"variables": [
{
"name": "color_var_with_expression",
"type": "color",
"value": "@{'#FF0000'}"
}
],
"platforms": [
"ios"
]
},
{
"expression": "@{url_var_with_expression}",
"expected": {
"type": "url",
"value": "https://ya.ru"
},
"variables": [
{
"name": "url_var_with_expression",
"type": "url",
"value": "@{'https://ya.ru'}"
}
],
"platforms": [
"ios"
]
},
{
"expression": "@{var_from_func}",
"expected": {
"type": "integer",
"value": 5
},
"variables": [
{
"name": "var_from_func",
"type": "integer",
"value": "@{len('Hello')}"
}
],
"platforms": [
"ios"
]
},
{
"expression": "@{circular_ref}",
"expected": {
"type": "error",
"value": "Variable 'circular_ref' is missing."
},
"variables": [
{
"name": "circular_ref",
"type": "integer",
"value": "@{circular_ref}"
}
],
"platforms": [
"ios"
]
},
{
"expression": "@{undeclred_var}",
"expected": {