MCPcopy Create free account
hub / github.com/tendermint/tendermint / TestStringSliceEqual

Function TestStringSliceEqual

libs/strings/string_test.go:58–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func TestStringSliceEqual(t *testing.T) {
59 tests := []struct {
60 a []string
61 b []string
62 want bool
63 }{
64 {[]string{"hello", "world"}, []string{"hello", "world"}, true},
65 {[]string{"test"}, []string{"test"}, true},
66 {[]string{"test1"}, []string{"test2"}, false},
67 {[]string{"hello", "world."}, []string{"hello", "world!"}, false},
68 {[]string{"only 1 word"}, []string{"two", "words!"}, false},
69 {[]string{"two", "words!"}, []string{"only 1 word"}, false},
70 }
71 for i, tt := range tests {
72 require.Equal(t, tt.want, StringSliceEqual(tt.a, tt.b),
73 "StringSliceEqual failed on test %d", i)
74 }
75}

Callers

nothing calls this directly

Calls 2

StringSliceEqualFunction · 0.85
EqualMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…