(t *testing.T)
| 21 | ) |
| 22 | |
| 23 | func Test_StringInSlice(t *testing.T) { |
| 24 | type args struct { |
| 25 | a string |
| 26 | list []string |
| 27 | } |
| 28 | tests := []struct { |
| 29 | name string |
| 30 | args args |
| 31 | want bool |
| 32 | }{ |
| 33 | { |
| 34 | name: "test true", |
| 35 | args: args{ |
| 36 | a: "string", |
| 37 | list: []string{"test", "string"}, |
| 38 | }, |
| 39 | want: true, |
| 40 | }, |
| 41 | { |
| 42 | name: "test false", |
| 43 | args: args{ |
| 44 | a: "string", |
| 45 | list: []string{"test", "nothere"}, |
| 46 | }, |
| 47 | want: false, |
| 48 | }, |
| 49 | } |
| 50 | for _, tt := range tests { |
| 51 | t.Run(tt.name, func(t *testing.T) { |
| 52 | if got := StringInSlice(tt.args.a, tt.args.list); got != tt.want { |
| 53 | assert.EqualValues(t, tt.want, got) |
| 54 | } |
| 55 | }) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | func TestIsFileOrStdin(t *testing.T) { |
| 60 | tests := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…