toml-racket version fe46aa2
FAIL valid/float/float
Values for key "leading-zero-fractional" don't match:
Expected: 0.0123
Your encoder: 0.123
input sent to parser-cmd:
pi = 3.14
pospi = +3.14
negpi = -3.14
zero-intpart = 0.123
leading-zero-fractional = 0.0123
output from parser-cmd (stdout):
{
"leading-zero-fractional": {"type": "float", "value": "0.123"},
"negpi": {"type": "float", "value": "-3.14"},
"pi": {"type": "float", "value": "3.14"},
"pospi": {"type": "float", "value": "3.14"},
"zero-intpart": {"type": "float", "value": "0.123"}
}
want:
{
"negpi": {"type": "float", "value": "-3.14"},
"pi": {"type": "float", "value": "3.14"},
"pospi": {"type": "float", "value": "3.14"},
"zero-intpart": {"type": "float", "value": "0.123"},
"leading-zero-fractional": {"type": "float", "value": "0.0123"}
}
FAIL valid/spec/float-0
Values for key "flt3" don't match:
Expected: -0.01
Your encoder: 0.1
input sent to parser-cmd:
# fractional
flt1 = +1.0
flt2 = 3.1415
flt3 = -0.01
# exponent
flt4 = 5e+22
flt5 = 1e06
flt6 = -2E-2
# both
flt7 = 6.626e-34
output from parser-cmd (stdout):
{
"flt1": {"type": "float", "value": "1.0"},
"flt2": {"type": "float", "value": "3.1415"},
"flt3": {"type": "float", "value": "0.1"},
"flt4": {"type": "float", "value": "5e+22"},
"flt5": {"type": "float", "value": "1000000.0"},
"flt6": {"type": "float", "value": "-0.02"},
"flt7": {"type": "float", "value": "6.626e-34"}
}
want:
{
"flt1": {"type": "float", "value": "1"},
"flt2": {"type": "float", "value": "3.1415"},
"flt3": {"type": "float", "value": "-0.01"},
"flt4": {"type": "float", "value": "5e+22"},
"flt5": {"type": "float", "value": "1e+06"},
"flt6": {"type": "float", "value": "-0.02"},
"flt7": {"type": "float", "value": "6.626e-34"}
}
FAIL invalid/datetime/offset-overflow-minute
Expected an error, but no error was reported.
input sent to parser-cmd:
# Minute must be 00-59; we allow 60 too because some people do write offsets of
# 60 minutes
d = 1985-06-18 17:04:07+12:61
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "1985-06-18T17:04:07+13:01"}
}
want:
Exit code 1
toml-test v2025-04-19 [./toml-compliance/compliance/decoder]: using embedded tests
valid tests: 192 passed, 2 failed
invalid tests: 376 passed, 1 failed
==> ENCODER TESTS
FAIL valid/float/max-int
Values for key "max_float" differ:
Expected: 9.007199254740991e+15 (float64)
Your encoder: 9007199254740991 (int64)
input sent to parser-cmd:
{
"max_float": {"type": "float", "value": "9007199254740991"},
"min_float": {"type": "float", "value": "-9007199254740991"}
}
output from parser-cmd (stdout):
max_float = 9007199254740991
min_float = -9007199254740991
want:
# Maximum and minimum safe natural numbers.
max_float = 9_007_199_254_740_991.0
min_float = -9_007_199_254_740_991.0
FAIL valid/float/zero
Values for key "exponent-signed-neg" differ:
Expected: -0 (float64)
Your encoder: 0 (int64)
input sent to parser-cmd:
{
"exponent": {"type": "float", "value": "0"},
"exponent-signed-neg": {"type": "float", "value": "-0"},
"exponent-signed-pos": {"type": "float", "value": "0"},
"exponent-two-0": {"type": "float", "value": "0"},
"signed-neg": {"type": "float", "value": "-0"},
"signed-pos": {"type": "float", "value": "0"},
"zero": {"type": "float", "value": "0"}
}
output from parser-cmd (stdout):
exponent = 0.0
exponent-signed-neg = 0
exponent-signed-pos = 0.0
exponent-two-0 = 0.0
signed-neg = 0
signed-pos = 0.0
zero = 0.0
want:
zero = 0.0
signed-pos = +0.0
signed-neg = -0.0
exponent = 0e0
exponent-two-0 = 0e00
exponent-signed-pos = +0e0
exponent-signed-neg = -0e0
FAIL valid/inline-table/array-values
Could not find key "a.a" in encoder output
input sent to parser-cmd:
{
"a": {"a": []},
"b": {
"a": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
],
"b": [
{"type": "integer", "value": "3"},
{"type": "integer", "value": "4"}
]
}
}
output from parser-cmd (stdout):
[a]
[b]
a = [
1,
2,
]
b = [
3,
4,
]
want:
# "No newlines are allowed between the curly braces unless they are valid within
# a value"
a = { a = [
]}
b = { a = [
1,
2,
], b = [
3,
4,
]}
FAIL valid/inline-table/key-dotted-5
Could not find key "arr-2.a" in encoder output
input sent to parser-cmd:
{
"arr-1": [{
"a": {
"b": {"type": "integer", "value": "1"}
}
}],
"arr-2": [
{"type": "string", "value": "str"},
{
"a": {
"b": {"type": "integer", "value": "1"}
}
}
],
"arr-3": [
{
"a": {
"b": {"type": "integer", "value": "1"}
}
},
{
"a": {
"b": {"type": "integer", "value": "2"}
}
}
],
"arr-4": [
{"type": "string", "value": "str"},
{
"a": {
"b": {"type": "integer", "value": "1"}
}
},
{
"a": {
"b": {"type": "integer", "value": "2"}
}
}
]
}
output from parser-cmd (stdout):
arr-2 = [
"str",
{ },
]
arr-4 = [
"str",
{ },
{ },
]
[[arr-1]]
[arr-1.a]
b = 1
[[arr-3]]
[arr-3.a]
b = 1
[[arr-3]]
[arr-3.a]
b = 2
want:
arr-1 = [{a.b = 1}]
arr-2 = ["str", {a.b = 1}]
arr-3 = [{a.b = 1}, {a.b = 2}]
arr-4 = ["str", {a.b = 1}, {a.b = 2}]
FAIL valid/inline-table/spaces
Values for key "clap-2.nest.b" differ:
Expected: 9 (float64)
Your encoder: 9 (int64)
input sent to parser-cmd:
{
"clap-1": {
"version": {"type": "string", "value": "4"},
"features": [
{"type": "string", "value": "derive"},
{"type": "string", "value": "cargo"}
]
},
"clap-2": {
"version": {"type": "string", "value": "4"},
"features": [
{"type": "string", "value": "derive"},
{"type": "string", "value": "cargo"}
],
"nest": {
"a": {"type": "string", "value": "x"},
"b": [
{"type": "float", "value": "1.5"},
{"type": "float", "value": "9"}
]
}
}
}
output from parser-cmd (stdout):
[clap-1]
features = [
"derive",
"cargo",
]
version = "4"
[clap-2]
features = [
"derive",
"cargo",
]
version = "4"
[clap-2.nest]
a = "x"
b = [
1.5,
9,
]
want:
# https://github.com/toml-lang/toml-test/issues/146
clap-1 = { version = "4" , features = ["derive", "cargo"] }
# Contains some literal tabs!
clap-2 = { version = "4" , features = [ "derive" , "cargo" ] , nest = { "a" = 'x' , 'b' = [ 1.5 , 9.0 ] } }
FAIL valid/key/quoted-unicode
decode TOML from encoder:
toml: line 3 (last key "\x00"): Key '"\u0000"' has already been defined.
input sent to parser-cmd:
{
"\u0000": {"type": "string", "value": "null"},
"\b \f A ÿ 𐀀 ": {"type": "string", "value": "escaped key"},
"\\u0000": {"type": "string", "value": "different key"},
"l ~ ÿ 𐀀 ": {"type": "string", "value": "literal key"},
"~ ÿ 𐀀 ": {"type": "string", "value": "basic key"}
}
output from parser-cmd (stdout):
"\u0000" = "null"
"\b \f A \u007f ÿ 𐀀 " = "escaped key"
"\u0000" = "different key"
"l ~ ÿ 𐀀 " = "literal key"
"~ ÿ 𐀀 " = "basic key"
want:
"\u0000" = "null"
'\u0000' = "different key"
"\u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff" = "escaped key"
"~ ÿ 𐀀 " = "basic key"
'l ~ ÿ 𐀀 ' = "literal key"
FAIL valid/spec/float-0
Values for key "flt1" differ:
Expected: 1 (float64)
Your encoder: 1 (int64)
input sent to parser-cmd:
{
"flt1": {"type": "float", "value": "1"},
"flt2": {"type": "float", "value": "3.1415"},
"flt3": {"type": "float", "value": "-0.01"},
"flt4": {"type": "float", "value": "5e+22"},
"flt5": {"type": "float", "value": "1e+06"},
"flt6": {"type": "float", "value": "-0.02"},
"flt7": {"type": "float", "value": "6.626e-34"}
}
output from parser-cmd (stdout):
flt1 = 1
flt2 = 3.1415
flt3 = -0.01
flt4 = 5e+22
flt5 = 1000000.0
flt6 = -0.02
flt7 = 6.626e-34
want:
# fractional
flt1 = +1.0
flt2 = 3.1415
flt3 = -0.01
# exponent
flt4 = 5e+22
flt5 = 1e06
flt6 = -2E-2
# both
flt7 = 6.626e-34
toml-test v2025-04-19 [./toml-compliance/compliance/encoder]: using embedded tests
encoder tests: 187 passed, 7 failed
took 0.0 0.0