@@ -8,16 +8,14 @@ import x.json2
88// `cd vlib/toml/tests/testdata`
99// `git clone --depth 1 https://github.com/BurntSushi/toml-test.git burntsushi/toml-test`
1010// See also the CI toml tests
11- // TODO Goal: make value retrieval of all of https://github.com/BurntSushi/toml-test/test/ pass
1211const (
1312 // Kept for easier handling of future updates to the tests
1413 valid_exceptions = []string {}
1514 invalid_exceptions = []string {}
1615
17- valid_value_exceptions = [
18- // Integer
19- 'integer/long.toml' , // TODO awaits BUG fix with strconv.parse_int('-9223372036854775808')
20- ]
16+ valid_value_exceptions = []string {}
17+ // BUG with string interpolation of '${i64(-9223372036854775808)}') see below for workaround
18+ // 'integer/long.toml', // TODO https://github.com/vlang/v/issues/9507
2119
2220 jq = os.find_abs_path_of_executable ('jq' ) or { '' }
2321 compare_work_dir_root = os.join_path (os.temp_dir (), 'v' , 'toml' , 'burntsushi' )
@@ -222,7 +220,12 @@ fn to_burntsushi(value ast.Value) string {
222220 }
223221 return '{ "type": "float", "value": "$val " }'
224222 }
225- return '{ "type": "integer", "value": "$value.i64 ()" }'
223+ v := value.i64 ()
224+ // TODO workaround https://github.com/vlang/v/issues/9507
225+ if v == i64 (- 9223372036854775807 - 1 ) {
226+ return '{ "type": "integer", "value": "-9223372036854775808" }'
227+ }
228+ return '{ "type": "integer", "value": "$v " }'
226229 }
227230 map [string ]ast.Value {
228231 mut str := '{ '
0 commit comments