(t *testing.T)
| 175 | } |
| 176 | |
| 177 | func TestSources(t *testing.T) { |
| 178 | cases := []struct { |
| 179 | osArgs []string |
| 180 | want []string |
| 181 | }{ |
| 182 | { |
| 183 | []string{"filename", "foo.cpp", "bar.java", "foo.bar.scala", "bar-foo.groovy"}, |
| 184 | []string{"foo.cpp", "bar.java", "foo.bar.scala", "bar-foo.groovy"}, |
| 185 | }, |
| 186 | { |
| 187 | []string{"filename", "a.cpp"}, |
| 188 | []string{"a.cpp"}, |
| 189 | }, |
| 190 | } |
| 191 | for _, c := range cases { |
| 192 | got := ParseOsArgs(c.osArgs) |
| 193 | if !reflect.DeepEqual(got.Options[Source], c.want) { |
| 194 | t.Errorf("ParseOsArgs %q != %q", got.Options[Source], c.want) |
| 195 | } |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | func TestImage(t *testing.T) { |
| 200 | cases := []struct { |
nothing calls this directly
no test coverage detected