From 4fd997bc137e31ce66d6ef4ad64d166d72692187 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Wed, 3 Feb 2021 20:06:33 +0000 Subject: Refactor the hiddenAPI() method for reusability A follow up change needs to be able to contribute to the information the hiddenapi process collates without having a dex file encoded. This change pushes all the functionality related to information gathering into the hiddenAPIGenerateCSV() method and then renames it and the hiddenAPI() method to make it clearer what they do. Bug: 178361284 Test: m droid Verified that hiddenapi files (both aggregated ones and for the individual modules) are not affected by this change. Change-Id: I04417720216a0fbadcd88e6185e7de6570af6216 --- java/hiddenapi_singleton_test.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'java/hiddenapi_singleton_test.go') diff --git a/java/hiddenapi_singleton_test.go b/java/hiddenapi_singleton_test.go index fcaa94adc..77cfff45c 100644 --- a/java/hiddenapi_singleton_test.go +++ b/java/hiddenapi_singleton_test.go @@ -76,14 +76,6 @@ func TestHiddenAPISingleton(t *testing.T) { } } -func checkRuleInputs(t *testing.T, expected string, hiddenAPIRule android.TestingBuildParams) { - actual := strings.TrimSpace(strings.Join(android.NormalizePathsForTesting(hiddenAPIRule.Implicits), "\n")) - expected = strings.TrimSpace(expected) - if actual != expected { - t.Errorf("Expected hiddenapi rule inputs:\n%s\nactual inputs:\n%s", expected, actual) - } -} - func TestHiddenAPIIndexSingleton(t *testing.T) { ctx, _ := testHiddenAPIBootJars(t, ` java_library { @@ -108,7 +100,7 @@ func TestHiddenAPIIndexSingleton(t *testing.T) { hiddenAPIIndex := ctx.SingletonForTests("hiddenapi_index") indexRule := hiddenAPIIndex.Rule("singleton-merged-hiddenapi-index") - checkRuleInputs(t, ` + CheckHiddenAPIRuleInputs(t, ` .intermediates/bar/android_common/hiddenapi/index.csv .intermediates/foo/android_common/hiddenapi/index.csv `, -- cgit v1.2.3-59-g8ed1b