Load each spelling that only restated a shorter one, as that shorter form
This commit is contained in:
@@ -2,11 +2,9 @@ package builtinfunc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"slices"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/larvit/fejkdata/internal/grammar"
|
||||
"github.com/larvit/fejkdata/internal/invariant"
|
||||
)
|
||||
|
||||
@@ -23,17 +21,6 @@ func TestRegistryShapes(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNoRefOperandsMatchesTheOperandGrammar(t *testing.T) {
|
||||
for name, b := range builtins {
|
||||
if b.operands == nil {
|
||||
continue
|
||||
}
|
||||
if takesRef := slices.ContainsFunc(b.operands([]string{"/x"}), grammar.IsRef); b.noRefOperands == takesRef {
|
||||
t.Errorf("%s: noRefOperands = %v, yet a reference /x read as an operand: %v", name, b.noRefOperands, takesRef)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestCheckNamesWhatACallGetsWrong(t *testing.T) {
|
||||
for _, c := range []struct {
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user