(t *testing.T)
| 232 | } |
| 233 | |
| 234 | func TestDifference(t *testing.T) { |
| 235 | for i, tt := range []testDifference[int]{ |
| 236 | testDifference[int]{ |
| 237 | input: testDifferenceInput[int]{ |
| 238 | []int{1, 2, 3, 3, 4}, |
| 239 | []int{1, 2, 5}, |
| 240 | []int{1, 3, 6}, |
| 241 | }, |
| 242 | output: []int{4, 5, 6}, |
| 243 | }, |
| 244 | //testDifference[interface{}]{ |
| 245 | //input: testDifferenceInput[string]{ |
| 246 | //[]string{"1", "2", "3", "3", "4"}, |
| 247 | //[]string{"1", "2", "5"}, |
| 248 | //[]string{"1", "3", "6"}, |
| 249 | //}, |
| 250 | //output: []string{"4", "5", "6"}, |
| 251 | //}, |
| 252 | } { |
| 253 | t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { |
| 254 | actual := Difference(tt.input...) |
| 255 | |
| 256 | if !isEqual(actual, tt.output) { |
| 257 | t.Errorf("expected: %v %T, received: %v %T", tt.output, tt.output, actual, actual) |
| 258 | } |
| 259 | }) |
| 260 | } |
| 261 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…