MCPcopy Create free account
hub / github.com/JordanCoin/codemap / TestFormatImporterReason

Function TestFormatImporterReason

cmd/intent_test.go:246–257  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

244}
245
246func TestFormatImporterReason(t *testing.T) {
247 reason := formatImporterReason("scanner/types.go", 5)
248 if reason == "" {
249 t.Error("expected non-empty reason")
250 }
251 if !contains(reason, "scanner/types.go") {
252 t.Error("reason should mention the file")
253 }
254 if !contains(reason, "5") {
255 t.Error("reason should mention the count")
256 }
257}
258
259func contains(s, substr string) bool {
260 return len(s) >= len(substr) && (s == substr || len(s) > 0 && containsHelper(s, substr))

Callers

nothing calls this directly

Calls 3

formatImporterReasonFunction · 0.85
containsFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected