mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-09-21 02:38:20 +03:00
Add test float
This commit is contained in:
parent
85360eb8b3
commit
0b2c069ff0
@ -23,8 +23,19 @@ jsonpath "$.float" > 0.0
|
||||
jsonpath "$.float" > 0
|
||||
jsonpath "$.float" != null
|
||||
|
||||
# 0.1 in 64-bit floating-point format is really 0.10000000000000000555111512312578270211815834045410
|
||||
# both 0.1 and 0.100000000000000005 have the same 64-bit float value
|
||||
jsonpath "$.float2" == 0.1
|
||||
jsonpath "$.float2" == 0.10000000000000000555111512312578270211815834045410
|
||||
jsonpath "$.float2" == 0.100000000000000005
|
||||
jsonpath "$.float2" < 0.1000000000000001
|
||||
jsonpath "$.float3" == 0.1
|
||||
jsonpath "$.float3" == 0.100000000000000005
|
||||
|
||||
{
|
||||
"integer": 1,
|
||||
"float": 1.0
|
||||
"float": 1.0,
|
||||
"float2": 0.1,
|
||||
"float3": 0.100000000000000005
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,9 @@ def predicates_number():
|
||||
return Response(
|
||||
"""{
|
||||
"integer": 1,
|
||||
"float": 1.0
|
||||
"float": 1.0,
|
||||
"float2": 0.1,
|
||||
"float3": 0.100000000000000005
|
||||
}""",
|
||||
mimetype="application/json",
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user