Answer prose round 1: delete two false comments, plainer SplitPath, evalCalc and decision wording, a shorter comprehension floor title, and item 110 owes a changelog entry
This commit is contained in:
+2
-2
@@ -105,11 +105,11 @@ func TestCalcReproducible(t *testing.T) {
|
||||
func TestParsedCallReadsOnlyAnOperandBuiltin(t *testing.T) {
|
||||
for _, format := range []string{"{luhn()}", "{calc()}", "{calc(1 +)}", "{calc(()}"} {
|
||||
if toks, err := grammar.ParseFormat(format); err != nil || len(toks) != 1 || tokenReads(toks[0]) != nil {
|
||||
t.Errorf("tokenReads(%q) = %+v, %v, want one call reading no operand", format, toks, err)
|
||||
t.Errorf("ParseFormat(%q) = %+v, %v, want one call reading no operand", format, toks, err)
|
||||
}
|
||||
}
|
||||
if toks, err := grammar.ParseFormat("{calc(net * qty)}"); err != nil || len(toks) != 1 || len(tokenReads(toks[0])) != 2 {
|
||||
t.Errorf("tokenReads({calc(net * qty)}) = %+v, %v, want both operands", toks, err)
|
||||
t.Errorf("ParseFormat({calc(net * qty)}) = %+v, %v, want both operands", toks, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user