MCPcopy Create free account
hub / github.com/google/gapid / TestCustomDiff

Function TestCustomDiff

core/data/compare/compare_test.go:458–467  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

456type unique bool
457
458func TestCustomDiff(t *testing.T) {
459 assert := assert.To(t)
460 custom := compare.Custom{}
461 got := custom.Diff(unique(false), unique(true), 1)
462 diff := []compare.Path{root.Diff(unique(false), unique(true))}
463 assert.For("pre-register").ThatSlice(got).DeepEquals(diff)
464 custom.Register(func(compare.Comparator, unique, unique) {})
465 got = custom.Diff(unique(false), unique(true), 1)
466 assert.For("pre-register").ThatSlice(got).DeepEquals(noDiff)
467}
468
469func TestInvalidCustomAction(t *testing.T) {
470 assert := assert.To(t)

Callers

nothing calls this directly

Calls 7

DiffMethod · 0.95
RegisterMethod · 0.95
ThatSliceMethod · 0.80
ForMethod · 0.80
uniqueTypeAlias · 0.70
DiffMethod · 0.45
DeepEqualsMethod · 0.45

Tested by

no test coverage detected