summaryrefslogtreecommitdiff
path: root/java/hiddenapi_singleton_test.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-02-03 20:06:33 +0000
committerPaul Duffin <paulduffin@google.com>2021-02-08 19:10:50 +0000
commit4fd997bc137e31ce66d6ef4ad64d166d72692187 (patch)
tree2111079c5747feb811232451418e315fed79b29a /java/hiddenapi_singleton_test.go
parent4103e92c4b8f1a30a82a32e8e22ed722ec7a866b (diff)
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
Diffstat (limited to 'java/hiddenapi_singleton_test.go')
-rw-r--r--java/hiddenapi_singleton_test.go10
1 files changed, 1 insertions, 9 deletions
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
`,