summaryrefslogtreecommitdiff
path: root/java/testing.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-03-11 18:43:31 +0000
committer Paul Duffin <paulduffin@google.com> 2021-03-22 19:13:40 +0000
commit001b2342f7a5be5502f9a2c8fc14b0c1f5c5a882 (patch)
tree6383e0cadbac8e7919dc82f31897e4ee12cc609e /java/testing.go
parent04b4a19fe600c904dd9e3531a7b64cc3cfae8dbe (diff)
Add platform_compat_config to sdk
Bug: 182402754 Test: m nothing Change-Id: Ife3f4f64fc116d62eb7c3cc10c50e00f19d1d81c
Diffstat (limited to 'java/testing.go')
-rw-r--r--java/testing.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/java/testing.go b/java/testing.go
index 4b8b84924..26d7c9325 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -319,3 +319,12 @@ func CheckHiddenAPIRuleInputs(t *testing.T, expected string, hiddenAPIRule andro
t.Errorf("Expected hiddenapi rule inputs:\n%s\nactual inputs:\n%s", expected, actual)
}
}
+
+// Check that the merged file create by platform_compat_config_singleton has the correct inputs.
+func CheckMergedCompatConfigInputs(t *testing.T, result *android.TestResult, message string, expectedPaths ...string) {
+ sourceGlobalCompatConfig := result.SingletonForTests("platform_compat_config_singleton")
+ allOutputs := sourceGlobalCompatConfig.AllOutputs()
+ android.AssertIntEquals(t, message+": output len", 1, len(allOutputs))
+ output := sourceGlobalCompatConfig.Output(allOutputs[0])
+ android.AssertPathsRelativeToTopEquals(t, message+": inputs", expectedPaths, output.Implicits)
+}