(t *testing.T)
| 115 | } |
| 116 | |
| 117 | func TestIsIsogram(t *testing.T) { |
| 118 | for _, test := range testCases { |
| 119 | t.Run(test.name, func(t *testing.T) { |
| 120 | actualVal, actualErr := strings.IsIsogram(test.input, test.order) |
| 121 | |
| 122 | if actualErr != nil && test.expectedErr.Error() != actualErr.Error() { |
| 123 | t.Errorf("Expected to be '%v' for string %s but was '%v'.", test.expectedErr, test.input, actualErr) |
| 124 | } |
| 125 | |
| 126 | if test.expectedVal != actualVal { |
| 127 | t.Errorf("Expected to be '%v' for string %s but was '%v'.", test.expectedVal, test.input, actualVal) |
| 128 | } |
| 129 | }) |
| 130 | } |
| 131 | } |
nothing calls this directly
no test coverage detected