Convert android/path_properties_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: If75f471885b5e4022b406e267e04b7a20e0be080
diff --git a/android/path_properties_test.go b/android/path_properties_test.go
index 85c96ee..8726ea7 100644
--- a/android/path_properties_test.go
+++ b/android/path_properties_test.go
@@ -15,7 +15,6 @@
package android
import (
- "reflect"
"testing"
)
@@ -158,23 +157,18 @@
}
`
- config := TestArchConfig(buildDir, nil, bp, nil)
- ctx := NewTestArchContext(config)
+ result := emptyTestFixtureFactory.RunTest(t,
+ PrepareForTestWithArchMutator,
+ PrepareForTestWithFilegroup,
+ FixtureRegisterWithContext(func(ctx RegistrationContext) {
+ ctx.RegisterModuleType("test", pathDepsMutatorTestModuleFactory)
+ }),
+ FixtureWithRootAndroidBp(bp),
+ )
- ctx.RegisterModuleType("test", pathDepsMutatorTestModuleFactory)
- ctx.RegisterModuleType("filegroup", FileGroupFactory)
+ m := result.Module("foo", "android_arm64_armv8-a").(*pathDepsMutatorTestModule)
- ctx.Register()
- _, errs := ctx.ParseFileList(".", []string{"Android.bp"})
- FailIfErrored(t, errs)
- _, errs = ctx.PrepareBuildActions(config)
- FailIfErrored(t, errs)
-
- m := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Module().(*pathDepsMutatorTestModule)
-
- if g, w := m.sourceDeps, test.deps; !reflect.DeepEqual(g, w) {
- t.Errorf("want deps %q, got %q", w, g)
- }
+ AssertDeepEquals(t, "deps", test.deps, m.sourceDeps)
})
}
}