(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func Test_alienOrder(t *testing.T) { |
| 9 | type args struct { |
| 10 | words []string |
| 11 | } |
| 12 | tests := []struct { |
| 13 | name string |
| 14 | args args |
| 15 | want string |
| 16 | }{ |
| 17 | { |
| 18 | name: "alien dictionary", |
| 19 | args: args{ |
| 20 | words: []string{ |
| 21 | "wrt", |
| 22 | "wrf", |
| 23 | "er", |
| 24 | "ett", |
| 25 | "rftt", |
| 26 | }, |
| 27 | }, |
| 28 | want: "wertf", |
| 29 | }, |
| 30 | { |
| 31 | name: "alien dictionary", |
| 32 | args: args{ |
| 33 | words: []string{ |
| 34 | "z", |
| 35 | "x", |
| 36 | }, |
| 37 | }, |
| 38 | want: "zx", |
| 39 | }, |
| 40 | { |
| 41 | name: "alien dictionary", |
| 42 | args: args{ |
| 43 | words: []string{ |
| 44 | "z", |
| 45 | "x", |
| 46 | "z", |
| 47 | }, |
| 48 | }, |
| 49 | want: "", |
| 50 | }, |
| 51 | { |
| 52 | name: "alien dictionary", |
| 53 | args: args{ |
| 54 | words: []string{ |
| 55 | "za", |
| 56 | "zb", |
| 57 | "ca", |
| 58 | "cb", |
| 59 | }, |
| 60 | }, |
| 61 | want: "azbc", |
| 62 | }, |
| 63 | } |
| 64 | for _, tt := range tests { |
| 65 | t.Run(tt.name, func(t *testing.T) { |
nothing calls this directly
no test coverage detected