MCPcopy Create free account
hub / github.com/stretchr/testify / TestDiffLists

Function TestDiffLists

assert/assertions_test.go:1308–1390  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1306}
1307
1308func TestDiffLists(t *testing.T) {
1309 tests := []struct {
1310 name string
1311 listA interface{}
1312 listB interface{}
1313 extraA []interface{}
1314 extraB []interface{}
1315 }{
1316 {
1317 name: "equal empty",
1318 listA: []string{},
1319 listB: []string{},
1320 extraA: nil,
1321 extraB: nil,
1322 },
1323 {
1324 name: "equal same order",
1325 listA: []string{"hello", "world"},
1326 listB: []string{"hello", "world"},
1327 extraA: nil,
1328 extraB: nil,
1329 },
1330 {
1331 name: "equal different order",
1332 listA: []string{"hello", "world"},
1333 listB: []string{"world", "hello"},
1334 extraA: nil,
1335 extraB: nil,
1336 },
1337 {
1338 name: "extra A",
1339 listA: []string{"hello", "hello", "world"},
1340 listB: []string{"hello", "world"},
1341 extraA: []interface{}{"hello"},
1342 extraB: nil,
1343 },
1344 {
1345 name: "extra A twice",
1346 listA: []string{"hello", "hello", "hello", "world"},
1347 listB: []string{"hello", "world"},
1348 extraA: []interface{}{"hello", "hello"},
1349 extraB: nil,
1350 },
1351 {
1352 name: "extra B",
1353 listA: []string{"hello", "world"},
1354 listB: []string{"hello", "hello", "world"},
1355 extraA: nil,
1356 extraB: []interface{}{"hello"},
1357 },
1358 {
1359 name: "extra B twice",
1360 listA: []string{"hello", "world"},
1361 listB: []string{"hello", "hello", "world", "hello"},
1362 extraA: nil,
1363 extraB: []interface{}{"hello", "hello"},
1364 },
1365 {

Callers

nothing calls this directly

Calls 3

diffListsFunction · 0.85
EqualFunction · 0.70
RunMethod · 0.65

Tested by

no test coverage detected