Extract failIfErrored() to android/testing.go
Bug: 74506774
Test: lunch aosp_walleye-userdebug && make # runs unit tests
Change-Id: I1c09412d5988dca2cc1c5f041893b313ab1c163a
diff --git a/android/namespace_test.go b/android/namespace_test.go
index a6fc9d5..8bec0ad 100644
--- a/android/namespace_test.go
+++ b/android/namespace_test.go
@@ -628,7 +628,7 @@
func setupTest(t *testing.T, bps map[string]string) (ctx *TestContext) {
ctx, errs := setupTestExpectErrs(bps)
- failIfErrored(t, errs)
+ FailIfErrored(t, errs)
return ctx
}
@@ -692,12 +692,3 @@
InitAndroidModule(m)
return m
}
-
-func failIfErrored(t *testing.T, errs []error) {
- if len(errs) > 0 {
- for _, err := range errs {
- t.Error(err)
- }
- t.FailNow()
- }
-}