MCPcopy
hub / github.com/expr-lang/expr / TestDiffLists

Function TestDiffLists

internal/testify/assert/assertions_test.go:1238–1320  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1236}
1237
1238func TestDiffLists(t *testing.T) {
1239 tests := []struct {
1240 name string
1241 listA interface{}
1242 listB interface{}
1243 extraA []interface{}
1244 extraB []interface{}
1245 }{
1246 {
1247 name: "equal empty",
1248 listA: []string{},
1249 listB: []string{},
1250 extraA: nil,
1251 extraB: nil,
1252 },
1253 {
1254 name: "equal same order",
1255 listA: []string{"hello", "world"},
1256 listB: []string{"hello", "world"},
1257 extraA: nil,
1258 extraB: nil,
1259 },
1260 {
1261 name: "equal different order",
1262 listA: []string{"hello", "world"},
1263 listB: []string{"world", "hello"},
1264 extraA: nil,
1265 extraB: nil,
1266 },
1267 {
1268 name: "extra A",
1269 listA: []string{"hello", "hello", "world"},
1270 listB: []string{"hello", "world"},
1271 extraA: []interface{}{"hello"},
1272 extraB: nil,
1273 },
1274 {
1275 name: "extra A twice",
1276 listA: []string{"hello", "hello", "hello", "world"},
1277 listB: []string{"hello", "world"},
1278 extraA: []interface{}{"hello", "hello"},
1279 extraB: nil,
1280 },
1281 {
1282 name: "extra B",
1283 listA: []string{"hello", "world"},
1284 listB: []string{"hello", "hello", "world"},
1285 extraA: nil,
1286 extraB: []interface{}{"hello"},
1287 },
1288 {
1289 name: "extra B twice",
1290 listA: []string{"hello", "world"},
1291 listB: []string{"hello", "hello", "world", "hello"},
1292 extraA: nil,
1293 extraB: []interface{}{"hello", "hello"},
1294 },
1295 {

Callers

nothing calls this directly

Calls 3

diffListsFunction · 0.85
RunMethod · 0.80
EqualFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…