Add FixtureIgnoreErrors

Bug: 182885307
Test: m nothing
Change-Id: Ib7e70b624db2f70374b755e97757ed21462b485a
This commit is contained in:
Paul Duffin
2021-03-17 00:20:34 +00:00
parent d250ff620a
commit 85034e92b6

View File

@@ -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.
//