(t *testing.T)
| 56 | } |
| 57 | |
| 58 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…