Files
man-y eed44f448f Mark flutter platform supported tests
commit_hash:a80884f8d89a14490cb02e5278507f93ef7fb589
2025-01-13 16:09:03 +03:00

239 lines
4.8 KiB
JSON

{
"cases": [
{
"expression": "@{toInteger(2.7182)}",
"expected": {
"type": "integer",
"value": 2
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger(3.1415)}",
"expected": {
"type": "integer",
"value": 3
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger(-2.7182)}",
"expected": {
"type": "integer",
"value": -2
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger(-3.1415)}",
"expected": {
"type": "integer",
"value": -3
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger(3.1415e64)}",
"expected": {
"type": "error",
"value": "Failed to evaluate [toInteger(3.1415E64)]. Unable to convert value to Integer."
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger(-3.1415e64)}",
"expected": {
"type": "error",
"value": "Failed to evaluate [toInteger(-3.1415E64)]. Unable to convert value to Integer."
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger('1')}",
"expected": {
"type": "integer",
"value": 1
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger('+1')}",
"expected": {
"type": "integer",
"value": 1
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger('-1')}",
"expected": {
"type": "integer",
"value": -1
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger('3.1415')}",
"expected": {
"type": "error",
"value": "Failed to evaluate [toInteger('3.1415')]. Unable to convert value to Integer."
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger('3141592653589793238462643')}",
"expected": {
"type": "error",
"value": "Failed to evaluate [toInteger('3141592653589793238462643')]. Unable to convert value to Integer."
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger('-3141592653589793238462643')}",
"expected": {
"type": "error",
"value": "Failed to evaluate [toInteger('-3141592653589793238462643')]. Unable to convert value to Integer."
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger('1+1')}",
"expected": {
"type": "error",
"value": "Failed to evaluate [toInteger('1+1')]. Unable to convert value to Integer."
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger('hello')}",
"expected": {
"type": "error",
"value": "Failed to evaluate [toInteger('hello')]. Unable to convert value to Integer."
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger(true)}",
"expected": {
"type": "integer",
"value": 1
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger(false)}",
"expected": {
"type": "integer",
"value": 0
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger()}",
"expected": {
"type": "error",
"value": "Failed to evaluate [toInteger()]. Function requires non empty argument list."
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"expression": "@{toInteger(1.0, 1.0)}",
"expected": {
"type": "error",
"value": "Failed to evaluate [toInteger(1.0, 1.0)]. Function has no matching overload for given argument types: Number, Number."
},
"platforms": [
"android",
"ios",
"web",
"flutter"
]
}
]
}