From 0a459e938dc9a38fa481e54832babad2f2015921 Mon Sep 17 00:00:00 2001 From: RiyaJohn Date: Thu, 16 Apr 2020 14:15:33 +0530 Subject: [PATCH] add float to test case to check leading zeroes in exponent parts --- example-crlf.toml | 1 + example.toml | 1 + parser_test.go | 2 ++ tomltree_write_test.go | 1 + 4 files changed, 5 insertions(+) diff --git a/example-crlf.toml b/example-crlf.toml index 12950a1..780d9c6 100644 --- a/example-crlf.toml +++ b/example-crlf.toml @@ -27,3 +27,4 @@ enabled = true [clients] 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 \ No newline at end of file diff --git a/example.toml b/example.toml index 3d902f2..f45bf88 100644 --- a/example.toml +++ b/example.toml @@ -27,3 +27,4 @@ enabled = true [clients] 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 \ No newline at end of file diff --git a/parser_test.go b/parser_test.go index a2ec3aa..65d11b0 100644 --- a/parser_test.go +++ b/parser_test.go @@ -783,6 +783,7 @@ func TestParseFile(t *testing.T) { []string{"gamma", "delta"}, []int64{1, 2}, }, + "score": 4e-08, }, }) } @@ -819,6 +820,7 @@ func TestParseFileCRLF(t *testing.T) { []string{"gamma", "delta"}, []int64{1, 2}, }, + "score": 4e-08, }, }) } diff --git a/tomltree_write_test.go b/tomltree_write_test.go index 4c6540b..efbe885 100644 --- a/tomltree_write_test.go +++ b/tomltree_write_test.go @@ -236,6 +236,7 @@ func TestTreeWriteToMapExampleFile(t *testing.T) { []interface{}{"gamma", "delta"}, []interface{}{int64(1), int64(2)}, }, + "score": 4e-08, }, } testMaps(t, tree.ToMap(), expected)