MCPcopy
hub / github.com/stretchr/testify / TestDiffLists

Function TestDiffLists

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

Source from the content-addressed store, hash-verified

1368}
1369
1370func TestDiffLists(t *testing.T) {
1371 t.Parallel()
1372
1373 tests := []struct {
1374 name string
1375 listA interface{}
1376 listB interface{}
1377 extraA []interface{}
1378 extraB []interface{}
1379 }{
1380 {
1381 name: "equal empty",
1382 listA: []string{},
1383 listB: []string{},
1384 extraA: nil,
1385 extraB: nil,
1386 },
1387 {
1388 name: "equal same order",
1389 listA: []string{"hello", "world"},
1390 listB: []string{"hello", "world"},
1391 extraA: nil,
1392 extraB: nil,
1393 },
1394 {
1395 name: "equal different order",
1396 listA: []string{"hello", "world"},
1397 listB: []string{"world", "hello"},
1398 extraA: nil,
1399 extraB: nil,
1400 },
1401 {
1402 name: "extra A",
1403 listA: []string{"hello", "hello", "world"},
1404 listB: []string{"hello", "world"},
1405 extraA: []interface{}{"hello"},
1406 extraB: nil,
1407 },
1408 {
1409 name: "extra A twice",
1410 listA: []string{"hello", "hello", "hello", "world"},
1411 listB: []string{"hello", "world"},
1412 extraA: []interface{}{"hello", "hello"},
1413 extraB: nil,
1414 },
1415 {
1416 name: "extra B",
1417 listA: []string{"hello", "world"},
1418 listB: []string{"hello", "hello", "world"},
1419 extraA: nil,
1420 extraB: []interface{}{"hello"},
1421 },
1422 {
1423 name: "extra B twice",
1424 listA: []string{"hello", "world"},
1425 listB: []string{"hello", "hello", "world", "hello"},
1426 extraA: nil,
1427 extraB: []interface{}{"hello", "hello"},

Callers

nothing calls this directly

Calls 3

diffListsFunction · 0.85
EqualFunction · 0.70
RunMethod · 0.45

Tested by

no test coverage detected