MCPcopy Index your code
hub / github.com/docker/docker-agent / TestStopReasonMapping

Function TestStopReasonMapping

pkg/runtime/sampling_test.go:194–214  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

192}
193
194func TestStopReasonMapping(t *testing.T) {
195 t.Parallel()
196
197 tests := []struct {
198 in chat.FinishReason
199 want string
200 }{
201 {chat.FinishReasonStop, "endTurn"},
202 {chat.FinishReasonLength, "maxTokens"},
203 {chat.FinishReasonToolCalls, "toolUse"},
204 {chat.FinishReasonNull, "endTurn"},
205 {"", "endTurn"},
206 }
207
208 for _, tt := range tests {
209 t.Run(string(tt.in), func(t *testing.T) {
210 t.Parallel()
211 assert.Equal(t, tt.want, stopReason(tt.in))
212 })
213 }
214}
215
216func TestDataURL(t *testing.T) {
217 t.Parallel()

Callers

nothing calls this directly

Calls 2

stopReasonFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected