From 46e37741a9a2aab78f0736d26bb4a78a31878f09 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Tue, 9 Mar 2021 11:55:20 +0000 Subject: [PATCH] Rename SetErrorHandler to ExtendWithErrorHandler Bug: 181070625 Test: m nothing Change-Id: Iacab525cb47fbd7ff54e5a95ec230ac6c71f20eb --- android/fixture.go | 8 ++++---- android/visibility_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/fixture.go b/android/fixture.go index edad2c163..67c4c9286 100644 --- a/android/fixture.go +++ b/android/fixture.go @@ -183,12 +183,12 @@ type FixtureFactory interface { // Create a Fixture. Fixture(t *testing.T, preparers ...FixturePreparer) Fixture - // SetErrorHandler creates a new FixtureFactory that will use the supplied error handler to check - // the errors (may be 0) reported by the test. + // ExtendWithErrorHandler creates a new FixtureFactory that will use the supplied error handler + // to check the errors (may be 0) reported by the test. // // The default handlers is FixtureExpectsNoErrors which will fail the go test immediately if any // errors are reported. - SetErrorHandler(errorHandler FixtureErrorHandler) FixtureFactory + ExtendWithErrorHandler(errorHandler FixtureErrorHandler) FixtureFactory // Run the test, checking any errors reported and returning a TestResult instance. // @@ -640,7 +640,7 @@ func (f *fixtureFactory) Fixture(t *testing.T, preparers ...FixturePreparer) Fix return fixture } -func (f *fixtureFactory) SetErrorHandler(errorHandler FixtureErrorHandler) FixtureFactory { +func (f *fixtureFactory) ExtendWithErrorHandler(errorHandler FixtureErrorHandler) FixtureFactory { newFactory := &fixtureFactory{} *newFactory = *f newFactory.errorHandler = errorHandler diff --git a/android/visibility_test.go b/android/visibility_test.go index b1471387b..eb4071eb7 100644 --- a/android/visibility_test.go +++ b/android/visibility_test.go @@ -1162,7 +1162,7 @@ func TestVisibility(t *testing.T) { // Add additional files to the mock filesystem test.fs.AddToFixture(), ). - SetErrorHandler(FixtureExpectsAllErrorsToMatchAPattern(test.expectedErrors)). + ExtendWithErrorHandler(FixtureExpectsAllErrorsToMatchAPattern(test.expectedErrors)). RunTest(t) if test.effectiveVisibility != nil {