diff options
author | 2021-03-23 11:17:06 +0000 | |
---|---|---|
committer | 2021-03-23 11:17:06 +0000 | |
commit | 7ee6e8fa0f683d9f54526e3c7cb2a5a08b6d0d4f (patch) | |
tree | 611f8315bca7616b0219ec34528586a50189b76e /java/testing.go | |
parent | e835389123f524adef12b00a660be7a134541f6c (diff) | |
parent | 001b2342f7a5be5502f9a2c8fc14b0c1f5c5a882 (diff) |
Merge "Add platform_compat_config to sdk"
Diffstat (limited to 'java/testing.go')
-rw-r--r-- | java/testing.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/java/testing.go b/java/testing.go index 2343294c6..b0290dc3d 100644 --- a/java/testing.go +++ b/java/testing.go @@ -321,3 +321,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) +} |