MCPcopy Create free account
hub / github.com/eth-easl/dirigent / TestDifferenceSecond

Function TestDifferenceSecond

pkg/map/maps_test.go:58–71  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func TestDifferenceSecond(t *testing.T) {
59 s1 := []string{"a", "b", "c"}
60 s2 := []string{"b", "c", "d"}
61
62 lr := Difference(s1, s2)
63 assert.NotNil(t, lr, "s1 \\ s2 yielded a wrong result.")
64 assert.Equal(t, len(lr), 1, "s1 \\ s2 yielded a wrong result.")
65 assert.Equal(t, lr[0], "a", "s1 \\ s2 yielded a wrong result.")
66
67 rr := Difference(s2, s1)
68 assert.NotNil(t, rr, "s2 \\ s1 yielded a wrong result.")
69 assert.Len(t, rr, 1, "s2 \\ s1 yielded a wrong result.")
70 assert.Equal(t, rr[0], "d", "s2 \\ s1 yielded a wrong result.")
71}

Callers

nothing calls this directly

Calls 2

DifferenceFunction · 0.85
LenMethod · 0.65

Tested by

no test coverage detected