Add test case for too many splits

Test: go soong tests
Change-Id: Iabce699e24c5ed71c2400e364e5395c042814824
This commit is contained in:
Liz Kammer
2021-04-13 15:15:15 -04:00
parent 6bd0a19b9d
commit f40afec4e0

View File

@@ -76,6 +76,12 @@ func TestGetCcInfoParseResults(t *testing.T) {
expectedOutput: CcInfo{}, expectedOutput: CcInfo{},
expectedErrorMessage: fmt.Sprintf("Expected %d items, got %q", 3, []string{"", ""}), expectedErrorMessage: fmt.Sprintf("Expected %d items, got %q", 3, []string{"", ""}),
}, },
{
description: "too many result splits",
input: "|||",
expectedOutput: CcInfo{},
expectedErrorMessage: fmt.Sprintf("Expected %d items, got %q", 3, []string{"", "", "", ""}),
},
} }
for _, tc := range testCases { for _, tc := range testCases {
actualOutput, err := GetCcInfo.ParseResult(tc.input) actualOutput, err := GetCcInfo.ParseResult(tc.input)