Add float to test case to check leading zeroes in exponent parts (#363)
* add float to test case to check leading zeroes in exponent parts * add testcase for query pkg
This commit is contained in:
@@ -27,3 +27,4 @@ enabled = true
|
|||||||
|
|
||||||
[clients]
|
[clients]
|
||||||
data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
|
data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
|
||||||
|
score = 4e-08 # to make sure leading zeroes in exponent parts of floats are supported
|
||||||
@@ -27,3 +27,4 @@ enabled = true
|
|||||||
|
|
||||||
[clients]
|
[clients]
|
||||||
data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
|
data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
|
||||||
|
score = 4e-08 # to make sure leading zeroes in exponent parts of floats are supported
|
||||||
@@ -783,6 +783,7 @@ func TestParseFile(t *testing.T) {
|
|||||||
[]string{"gamma", "delta"},
|
[]string{"gamma", "delta"},
|
||||||
[]int64{1, 2},
|
[]int64{1, 2},
|
||||||
},
|
},
|
||||||
|
"score": 4e-08,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -819,6 +820,7 @@ func TestParseFileCRLF(t *testing.T) {
|
|||||||
[]string{"gamma", "delta"},
|
[]string{"gamma", "delta"},
|
||||||
[]int64{1, 2},
|
[]int64{1, 2},
|
||||||
},
|
},
|
||||||
|
"score": 4e-08,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -407,7 +407,10 @@ func TestQueryFilterFn(t *testing.T) {
|
|||||||
|
|
||||||
assertQueryPositions(t, string(buff),
|
assertQueryPositions(t, string(buff),
|
||||||
"$..[?(float)]",
|
"$..[?(float)]",
|
||||||
[]interface{}{ // no float values in document
|
[]interface{}{
|
||||||
|
queryTestNode{
|
||||||
|
4e-08, toml.Position{30, 1},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
tv, _ := time.Parse(time.RFC3339, "1979-05-27T07:32:00Z")
|
tv, _ := time.Parse(time.RFC3339, "1979-05-27T07:32:00Z")
|
||||||
@@ -460,6 +463,7 @@ func TestQueryFilterFn(t *testing.T) {
|
|||||||
[]interface{}{"gamma", "delta"},
|
[]interface{}{"gamma", "delta"},
|
||||||
[]interface{}{int64(1), int64(2)},
|
[]interface{}{int64(1), int64(2)},
|
||||||
},
|
},
|
||||||
|
"score": 4e-08,
|
||||||
}, toml.Position{28, 1},
|
}, toml.Position{28, 1},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ func TestTreeWriteToMapExampleFile(t *testing.T) {
|
|||||||
[]interface{}{"gamma", "delta"},
|
[]interface{}{"gamma", "delta"},
|
||||||
[]interface{}{int64(1), int64(2)},
|
[]interface{}{int64(1), int64(2)},
|
||||||
},
|
},
|
||||||
|
"score": 4e-08,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
testMaps(t, tree.ToMap(), expected)
|
testMaps(t, tree.ToMap(), expected)
|
||||||
|
|||||||
Reference in New Issue
Block a user