summaryrefslogtreecommitdiff
path: root/java/sdk_library_test.go
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2021-06-24 00:04:42 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-06-24 00:04:42 +0000
commita8de9fb2aea3e543313eef63ec2c8b1389796097 (patch)
tree16d9c9e264ca2509dca91755127886fd7f9a6fcc /java/sdk_library_test.go
parentc1218f395c9af4d283680e2f79d895d34b774965 (diff)
parentb97b1579d3374ada49887d356dd6dd693d32a18d (diff)
Merge "Remove duplicate component from sdk snapshot"
Diffstat (limited to 'java/sdk_library_test.go')
-rw-r--r--java/sdk_library_test.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/java/sdk_library_test.go b/java/sdk_library_test.go
index 2520dde6e..65af95314 100644
--- a/java/sdk_library_test.go
+++ b/java/sdk_library_test.go
@@ -110,7 +110,7 @@ func TestJavaSdkLibrary(t *testing.T) {
`)
// check the existence of the internal modules
- result.ModuleForTests("foo", "android_common")
+ foo := result.ModuleForTests("foo", "android_common")
result.ModuleForTests(apiScopePublic.stubsLibraryModuleName("foo"), "android_common")
result.ModuleForTests(apiScopeSystem.stubsLibraryModuleName("foo"), "android_common")
result.ModuleForTests(apiScopeTest.stubsLibraryModuleName("foo"), "android_common")
@@ -122,6 +122,17 @@ func TestJavaSdkLibrary(t *testing.T) {
result.ModuleForTests("foo.api.system.28", "")
result.ModuleForTests("foo.api.test.28", "")
+ exportedComponentsInfo := result.ModuleProvider(foo.Module(), ExportedComponentsInfoProvider).(ExportedComponentsInfo)
+ expectedFooExportedComponents := []string{
+ "foo.stubs",
+ "foo.stubs.source",
+ "foo.stubs.source.system",
+ "foo.stubs.source.test",
+ "foo.stubs.system",
+ "foo.stubs.test",
+ }
+ android.AssertArrayString(t, "foo exported components", expectedFooExportedComponents, exportedComponentsInfo.Components)
+
bazJavac := result.ModuleForTests("baz", "android_common").Rule("javac")
// tests if baz is actually linked to the stubs lib
android.AssertStringDoesContain(t, "baz javac classpath", bazJavac.Args["classpath"], "foo.stubs.system.jar")