aboutsummaryrefslogtreecommitdiffstats
path: root/xml
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2019-11-22 15:25:03 -0800
committerColin Cross <ccross@android.com>2019-11-25 10:59:44 -0800
commit4b49b768a2cb7d455aea5347d27d9045b8c481fa (patch)
treea8b5167209d668a3c4d97357e00528982d24cc31 /xml
parent62835fd85fc175f71a9512eedbc0e27cbe2ff30b (diff)
downloadbuild_soong-4b49b768a2cb7d455aea5347d27d9045b8c481fa.tar.gz
build_soong-4b49b768a2cb7d455aea5347d27d9045b8c481fa.tar.bz2
build_soong-4b49b768a2cb7d455aea5347d27d9045b8c481fa.zip
Make TestContext.RegisterModuleType take an android.ModuleFactory
Avoid having to pass ModuleFactoryAdaptor to every call to RegisterModuleType in a test by wrapping RegisterModuleType. Test: all soong tests Change-Id: If8847d16487de0479cc3020b728256922b3cadba
Diffstat (limited to 'xml')
-rw-r--r--xml/xml_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/xml/xml_test.go b/xml/xml_test.go
index f2a440f9..0a115667 100644
--- a/xml/xml_test.go
+++ b/xml/xml_test.go
@@ -50,8 +50,8 @@ func TestMain(m *testing.M) {
func testXml(t *testing.T, bp string) *android.TestContext {
config := android.TestArchConfig(buildDir, nil)
ctx := android.NewTestArchContext()
- ctx.RegisterModuleType("prebuilt_etc", android.ModuleFactoryAdaptor(android.PrebuiltEtcFactory))
- ctx.RegisterModuleType("prebuilt_etc_xml", android.ModuleFactoryAdaptor(PrebuiltEtcXmlFactory))
+ ctx.RegisterModuleType("prebuilt_etc", android.PrebuiltEtcFactory)
+ ctx.RegisterModuleType("prebuilt_etc_xml", PrebuiltEtcXmlFactory)
ctx.Register()
mockFiles := map[string][]byte{
"Android.bp": []byte(bp),