Adapt tests to show that floats work properly.
This commit is contained in:
@@ -12,7 +12,9 @@ builtins.fromJSON
|
||||
"Width": 100
|
||||
},
|
||||
"Animated" : false,
|
||||
"IDs": [116, 943, 234, 38793, true ,false,null, -100]
|
||||
"IDs": [116, 943, 234, 38793, true ,false,null, -100],
|
||||
"Latitude": 37.7668,
|
||||
"Longitude": -122.3959,
|
||||
}
|
||||
}
|
||||
''
|
||||
@@ -28,5 +30,7 @@ builtins.fromJSON
|
||||
};
|
||||
Animated = false;
|
||||
IDs = [ 116 943 234 38793 true false null (0-100) ];
|
||||
Latitude = 37.7668;
|
||||
Longitude = -122.3959;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
"{\"a\":123,\"b\":-456,\"c\":\"foo\",\"d\":\"foo\\n\\\"bar\\\"\",\"e\":true,\"f\":false,\"g\":[1,2,3],\"h\":[\"a\",[\"b\",{\"foo\\nbar\":{}}]],\"i\":3}"
|
||||
"{\"a\":123,\"b\":-456,\"c\":\"foo\",\"d\":\"foo\\n\\\"bar\\\"\",\"e\":true,\"f\":false,\"g\":[1,2,3],\"h\":[\"a\",[\"b\",{\"foo\\nbar\":{}}]],\"i\":3,\"j\":1.44}"
|
||||
|
||||
@@ -8,4 +8,5 @@ builtins.toJSON
|
||||
g = [ 1 2 3 ];
|
||||
h = [ "a" [ "b" { "foo\nbar" = {}; } ] ];
|
||||
i = 1 + 2;
|
||||
j = 1.44;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
[ true false true false true false true false true false true false "int" "bool" "string" "null" "set" "list" "lambda" "lambda" "lambda" "lambda" ]
|
||||
[ true false true false true false true false true true true true true true true true true true true false true false "int" "bool" "string" "null" "set" "list" "lambda" "lambda" "lambda" "lambda" ]
|
||||
|
||||
@@ -8,6 +8,16 @@ with builtins;
|
||||
(isString [ "x" ])
|
||||
(isInt (1 + 2))
|
||||
(isInt { x = 123; })
|
||||
(isInt (1 / 2))
|
||||
(isInt (1 + 1))
|
||||
(isInt (1 / 2))
|
||||
(isInt (1 * 2))
|
||||
(isInt (1 - 2))
|
||||
(isFloat (1.2))
|
||||
(isFloat (1 + 1.0))
|
||||
(isFloat (1 / 2.0))
|
||||
(isFloat (1 * 2.0))
|
||||
(isFloat (1 - 2.0))
|
||||
(isBool (true && false))
|
||||
(isBool null)
|
||||
(isAttrs { x = 123; })
|
||||
|
||||
@@ -45,5 +45,8 @@
|
||||
<attr name="x">
|
||||
<int value="123" />
|
||||
</attr>
|
||||
<attr name="y">
|
||||
<float value="567.89" />
|
||||
</attr>
|
||||
</attrs>
|
||||
</expr>
|
||||
|
||||
@@ -2,6 +2,8 @@ rec {
|
||||
|
||||
x = 123;
|
||||
|
||||
y = 567.890;
|
||||
|
||||
a = "foo";
|
||||
|
||||
b = "bar";
|
||||
|
||||
Reference in New Issue
Block a user