(t *testing.T)
| 174 | } |
| 175 | |
| 176 | func TestI32SCalledTwice(t *testing.T) { |
| 177 | var is []int32 |
| 178 | f := setUpI32SFlagSet(&is) |
| 179 | |
| 180 | in := []string{"1,2", "3"} |
| 181 | expected := []int32{1, 2, 3} |
| 182 | argfmt := "--is=%s" |
| 183 | arg1 := fmt.Sprintf(argfmt, in[0]) |
| 184 | arg2 := fmt.Sprintf(argfmt, in[1]) |
| 185 | err := f.Parse([]string{arg1, arg2}) |
| 186 | if err != nil { |
| 187 | t.Fatal("expected no error; got", err) |
| 188 | } |
| 189 | for i, v := range is { |
| 190 | if expected[i] != v { |
| 191 | t.Fatalf("expected is[%d] to be %d but got: %d", i, expected[i], v) |
| 192 | } |
| 193 | } |
| 194 | } |
nothing calls this directly
no test coverage detected