(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func Test_minWindow(t *testing.T) { |
| 9 | type args struct { |
| 10 | s string |
| 11 | t string |
| 12 | } |
| 13 | tests := []struct { |
| 14 | name string |
| 15 | args args |
| 16 | want string |
| 17 | }{ |
| 18 | { |
| 19 | name: "minimum window substring", |
| 20 | args: args{ |
| 21 | s: "ABAACBAB", |
| 22 | t: "ABC", |
| 23 | }, |
| 24 | want: "ACB", |
| 25 | }, |
| 26 | { |
| 27 | name: "minimum window substring", |
| 28 | args: args{ |
| 29 | s: "ZADOBECOAEBANC", |
| 30 | t: "ABC", |
| 31 | }, |
| 32 | want: "BANC", |
| 33 | }, |
| 34 | { |
| 35 | name: "minimum window substring", |
| 36 | args: args{ |
| 37 | s: "A", |
| 38 | t: "A", |
| 39 | }, |
| 40 | want: "A", |
| 41 | }, |
| 42 | { |
| 43 | name: "minimum window substring", |
| 44 | args: args{ |
| 45 | s: "A", |
| 46 | t: "B", |
| 47 | }, |
| 48 | want: "", |
| 49 | }, |
| 50 | { |
| 51 | name: "minimum window substring", |
| 52 | args: args{ |
| 53 | s: "AB", |
| 54 | t: "A", |
| 55 | }, |
| 56 | want: "A", |
| 57 | }, |
| 58 | { |
| 59 | name: "minimum window substring", |
| 60 | args: args{ |
| 61 | s: "AB", |
| 62 | t: "B", |
| 63 | }, |
| 64 | want: "B", |
| 65 | }, |
nothing calls this directly
no test coverage detected