Answer stability round 1, prose round 1 and product-owner round 1: startOf's doc names the head, the old senses leave names, comments, messages and tests, and the vocabulary defines scope, link and head

This commit is contained in:
2026-10-07 00:56:45 +02:00
committed by Lillem4n
parent 98bb73f096
commit 63223c6d63
25 changed files with 81 additions and 80 deletions
+4 -4
View File
@@ -204,7 +204,7 @@ func TestCalcOverANeverNumericOperandIsRejected(t *testing.T) {
`{"format":"{calc(x * 2)}","x":["a","b"]}`: `"x"`,
`{"format":"{calc(x + y)}","x":"1","y":"{{2}}"}`: `"{2}"`,
} {
_, err := linked(t, src)
_, err := resolved(t, src)
if err == nil || !strings.Contains(err.Error(), want) || !strings.Contains(err.Error(), "never a number") {
t.Errorf("compile(%s) = %v, want the operand rejected naming %s", src, err, want)
}
@@ -215,7 +215,7 @@ func TestCalcOverANeverNumericOperandIsRejected(t *testing.T) {
`{"format":"{calc(x * 2)}","x":["1","abc"]}`,
`{"format":"{calc(x * 2)}","x":"{digits(2)}"}`,
} {
if _, err := linked(t, ok); err != nil {
if _, err := resolved(t, ok); err != nil {
t.Errorf("compile(%s) = %v, want it accepted", ok, err)
}
}
@@ -230,7 +230,7 @@ func TestCalcConstantZeroDivisorIsRejected(t *testing.T) {
`{"format":"{calc((a/0)+b)}","a":"1","b":"2"}`: "divides by 0",
`{"format":"{calc(a/-0)}","a":"1"}`: "divides by -0",
} {
if _, err := linked(t, src); err == nil || !strings.Contains(err.Error(), want) {
if _, err := resolved(t, src); err == nil || !strings.Contains(err.Error(), want) {
t.Errorf("compile(%s) = %v, want the constant zero divisor rejected naming %q", src, err, want)
}
}
@@ -259,7 +259,7 @@ func TestCalcCompileErrors(t *testing.T) {
`"{calc(1, x)}"`, // decimals arg not an integer
`"{calc(1, -1)}"`, // decimals negative
} {
if _, err := linked(t, bad); err == nil {
if _, err := resolved(t, bad); err == nil {
t.Errorf("compile(%s) = nil error, want error", bad)
}
}