Fix Errorf format string for error
Also go ahead and mark `checkOverrides` as a `t.Helper()`
Test: go test
Change-Id: I368aabf4d032c02773416f27affa12eb40e77b40
diff --git a/cc/testing.go b/cc/testing.go
index 6a655db..992069b 100644
--- a/cc/testing.go
+++ b/cc/testing.go
@@ -739,12 +739,13 @@
}
func checkOverrides(t *testing.T, ctx *android.TestContext, singleton android.TestingSingleton, jsonPath string, expected []string) {
+ t.Helper()
out := singleton.MaybeOutput(jsonPath)
content := android.ContentFromFileRuleForTests(t, out)
var flags snapshotJsonFlags
if err := json.Unmarshal([]byte(content), &flags); err != nil {
- t.Errorf("Error while unmarshalling json %q: %w", jsonPath, err)
+ t.Errorf("Error while unmarshalling json %q: %s", jsonPath, err.Error())
return
}