From 85034e92b6e62f0b63e7506e429ef908354255b8 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Wed, 17 Mar 2021 00:20:34 +0000 Subject: [PATCH] Add FixtureIgnoreErrors Bug: 182885307 Test: m nothing Change-Id: Ib7e70b624db2f70374b755e97757ed21462b485a --- android/fixture.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/fixture.go b/android/fixture.go index 0bff99593..6db43e25a 100644 --- a/android/fixture.go +++ b/android/fixture.go @@ -506,6 +506,14 @@ var FixtureExpectsNoErrors = FixtureCustomErrorHandler( }, ) +// FixtureIgnoreErrors ignores any errors. +// +// If this is used then it is the responsibility of the test to check the TestResult.Errs does not +// contain any unexpected errors. +var FixtureIgnoreErrors = FixtureCustomErrorHandler(func(t *testing.T, result *TestResult) { + // Ignore the errors +}) + // FixtureExpectsAtLeastOneMatchingError returns an error handler that will cause the test to fail // if at least one error that matches the regular expression is not found. //