MCPcopy Create free account
hub / github.com/cel-expr/cel-go / TestNewTextSourceWithLimit_Exceeded

Function TestNewTextSourceWithLimit_Exceeded

common/source_test.go:140–148  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

138}
139
140func TestNewTextSourceWithLimit_Exceeded(t *testing.T) {
141 _, err := NewTextSourceWithLimit("greetings", 5)
142 if err == nil {
143 t.Fatalf("expected size limit error, got nil")
144 }
145 if !strings.Contains(err.Error(), "size exceeds limit") {
146 t.Fatalf("unexpected error: %v", err)
147 }
148}
149
150func TestNewTextSourceWithLimit_MultibyteWithinLimit(t *testing.T) {
151 data := "🙂🙂"

Callers

nothing calls this directly

Calls 3

NewTextSourceWithLimitFunction · 0.85
ContainsMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected