Test that each spelling goal 5.7 no longer refuses loads as its shorter form

This commit is contained in:
2026-10-07 22:23:18 +02:00
committed by Lillem4n
parent 4930a2ac8d
commit 91b65e3ded
13 changed files with 214 additions and 143 deletions
+1 -4
View File
@@ -17,7 +17,7 @@ func TestLiteralSaysWhichDatatypesItsTextIs(t *testing.T) {
{"1.5", [datatype.Count]bool{datatype.Integer: true, datatype.Boolean: true}},
{"true", [datatype.Count]bool{datatype.Integer: true, datatype.Number: true}},
{"007", [datatype.Count]bool{datatype.Integer: true, datatype.Number: true, datatype.Boolean: true}},
{"-0", [datatype.Count]bool{datatype.Integer: true, datatype.Number: true, datatype.Boolean: true}},
{"-0", [datatype.Count]bool{datatype.Boolean: true}},
} {
v := Literal(c.text)
for d := datatype.Integer; d < datatype.Count; d++ {
@@ -26,9 +26,6 @@ func TestLiteralSaysWhichDatatypesItsTextIs(t *testing.T) {
}
}
}
if v := Literal("-0"); v.Not[datatype.Integer] != `"-0" is zero written with a sign; write "0"` {
t.Errorf("Literal(-0) = %q, want the unsigned spelling named", v.Not[datatype.Integer])
}
}
func TestOrKeepsTheBoundsOfBothAndTheFirstReason(t *testing.T) {