Remove uses of FixtureFactory from android package
Bug: 183235980
Test: m nothing
Change-Id: I72898ada020ee1a73fd534c61afb5c22fa00c1e5
diff --git a/android/singleton_module_test.go b/android/singleton_module_test.go
index 41dd4bb..eb5554c 100644
--- a/android/singleton_module_test.go
+++ b/android/singleton_module_test.go
@@ -56,11 +56,10 @@
name: "test_singleton_module",
}
`
- result := emptyTestFixtureFactory.
- RunTest(t,
- prepareForSingletonModuleTest,
- FixtureWithRootAndroidBp(bp),
- )
+ result := GroupFixturePreparers(
+ prepareForSingletonModuleTest,
+ FixtureWithRootAndroidBp(bp),
+ ).RunTest(t)
ops := result.ModuleForTests("test_singleton_module", "").Module().(*testSingletonModule).ops
wantOps := []string{"GenerateAndroidBuildActions", "GenerateSingletonBuildActions", "MakeVars"}
@@ -78,19 +77,16 @@
}
`
- emptyTestFixtureFactory.
+ prepareForSingletonModuleTest.
ExtendWithErrorHandler(FixtureExpectsAllErrorsToMatchAPattern([]string{
`\QDuplicate SingletonModule "test_singleton_module", previously used in\E`,
- })).RunTest(t,
- prepareForSingletonModuleTest,
- FixtureWithRootAndroidBp(bp),
- )
+ })).RunTestWithBp(t, bp)
}
func TestUnusedSingletonModule(t *testing.T) {
- result := emptyTestFixtureFactory.RunTest(t,
+ result := GroupFixturePreparers(
prepareForSingletonModuleTest,
- )
+ ).RunTest(t)
singleton := result.SingletonForTests("test_singleton_module").Singleton()
sm := singleton.(*singletonModuleSingletonAdaptor).sm
@@ -113,17 +109,16 @@
}
`
- emptyTestFixtureFactory.
+ GroupFixturePreparers(
+ prepareForSingletonModuleTest,
+ FixtureRegisterWithContext(func(ctx RegistrationContext) {
+ ctx.PreDepsMutators(func(ctx RegisterMutatorsContext) {
+ ctx.BottomUp("test_singleton_module_mutator", testVariantSingletonModuleMutator)
+ })
+ }),
+ ).
ExtendWithErrorHandler(FixtureExpectsAllErrorsToMatchAPattern([]string{
`\QGenerateAndroidBuildActions already called for variant\E`,
})).
- RunTest(t,
- prepareForSingletonModuleTest,
- FixtureRegisterWithContext(func(ctx RegistrationContext) {
- ctx.PreDepsMutators(func(ctx RegisterMutatorsContext) {
- ctx.BottomUp("test_singleton_module_mutator", testVariantSingletonModuleMutator)
- })
- }),
- FixtureWithRootAndroidBp(bp),
- )
+ RunTestWithBp(t, bp)
}