(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestScore_String(t *testing.T) { |
| 12 | testCases := []struct { |
| 13 | confidence Confidence |
| 14 | expectedString string |
| 15 | }{ |
| 16 | {High, "High"}, |
| 17 | {Medium, "Medium"}, |
| 18 | {Low, "Low"}, |
| 19 | {None, "None"}, |
| 20 | {Confidence(42), "Unknown"}, // Unknown confidence scores |
| 21 | } |
| 22 | |
| 23 | for _, testCase := range testCases { |
| 24 | t.Run(testCase.expectedString, func(t *testing.T) { |
| 25 | actualString := testCase.confidence.String() |
| 26 | if actualString != testCase.expectedString { |
| 27 | t.Errorf("Expected string representation %s, but got %s", testCase.expectedString, actualString) |
| 28 | } |
| 29 | }) |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func TestDefaultDetectors(t *testing.T) { |
| 34 | // Verify that the default detectors are present |
nothing calls this directly
no test coverage detected