MCPcopy Create free account
hub / github.com/diillson/chatcli / TestErrorClass_String

Function TestErrorClass_String

llm/fallback/chain_test.go:543–561  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

541}
542
543func TestErrorClass_String(t *testing.T) {
544 tests := []struct {
545 class ErrorClass
546 expected string
547 }{
548 {ErrorClassUnknown, "unknown"},
549 {ErrorClassRateLimit, "rate_limit"},
550 {ErrorClassTimeout, "timeout"},
551 {ErrorClassAuth, "auth_error"},
552 {ErrorClassServerError, "server_error"},
553 {ErrorClassModelNotFound, "model_not_found"},
554 {ErrorClassContextTooLong, "context_too_long"},
555 }
556 for _, tt := range tests {
557 if got := tt.class.String(); got != tt.expected {
558 t.Errorf("%d.String() = %q, want %q", tt.class, got, tt.expected)
559 }
560 }
561}
562
563func TestWithOptions(t *testing.T) {
564 chain := NewChain(newTestLogger(), nil,

Callers

nothing calls this directly

Calls 2

ErrorfMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected