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

Function TestBytesLiteral_errors

expr_test.go:2994–3007  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2992}
2993
2994func TestBytesLiteral_errors(t *testing.T) {
2995 // \u and \U escapes should not be allowed in bytes literals
2996 errorCases := []string{
2997 `b'\u0041'`,
2998 `b"\U00000041"`,
2999 }
3000
3001 for _, code := range errorCases {
3002 t.Run(code, func(t *testing.T) {
3003 _, err := expr.Compile(code)
3004 require.Error(t, err)
3005 })
3006 }
3007}

Callers

nothing calls this directly

Calls 3

CompileFunction · 0.92
ErrorFunction · 0.92
RunMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…