(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func TestTable(t *testing.T) { |
| 39 | type args struct { |
| 40 | w string |
| 41 | } |
| 42 | tests := []struct { |
| 43 | name string |
| 44 | args args |
| 45 | want []int |
| 46 | }{ |
| 47 | { |
| 48 | name: "test1", |
| 49 | args: args{ |
| 50 | w: "ababacaab", |
| 51 | }, |
| 52 | want: []int{-1, 0, 0, 1, 2, 3, 0, 1, 1}, |
| 53 | }, |
| 54 | } |
| 55 | for _, tt := range tests { |
| 56 | t.Run(tt.name, func(t *testing.T) { |
| 57 | if got := table(tt.args.w); !reflect.DeepEqual(got, tt.want) { |
| 58 | t.Errorf("Table() = %v, want %v", got, tt.want) |
| 59 | } |
| 60 | }) |
| 61 | } |
| 62 | } |