MCPcopy Create free account
hub / github.com/expr-lang/expr / TestCompile_IntegerArgsFunc

Function TestCompile_IntegerArgsFunc

compiler/compiler_test.go:649–669  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

647}
648
649func TestCompile_IntegerArgsFunc(t *testing.T) {
650 env := mock.Env{}
651 tests := []struct{ code string }{
652 {"FuncInt(0)"},
653 {"FuncInt8(0)"},
654 {"FuncInt16(0)"},
655 {"FuncInt32(0)"},
656 {"FuncInt64(0)"},
657 {"FuncUint(0)"},
658 {"FuncUint8(0)"},
659 {"FuncUint16(0)"},
660 {"FuncUint32(0)"},
661 {"FuncUint64(0)"},
662 }
663 for _, tt := range tests {
664 t.Run(tt.code, func(t *testing.T) {
665 _, err := expr.Compile(tt.code, expr.Env(env))
666 require.NoError(t, err)
667 })
668 }
669}
670
671func TestCompile_call_on_nil(t *testing.T) {
672 env := map[string]any{

Callers

nothing calls this directly

Calls 4

CompileFunction · 0.92
EnvStruct · 0.92
NoErrorFunction · 0.92
RunMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…