summaryrefslogtreecommitdiff
path: root/java/sdk_library_test.go
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2021-07-07 17:54:01 +0000
committerScott Lobdell <slobdell@google.com>2021-07-07 17:54:01 +0000
commit99f82c6f4a8511ded6de5e2b5e00565fad7f65de (patch)
treea1ecabe68c443bf3d596fe06417e98cc54dc7470 /java/sdk_library_test.go
parentc57cdd121a8d5a0883a689f6d9fbe6fc440e2202 (diff)
parent5abcf9267173b9e80dd14fca037b0f01cc2dbd3b (diff)
Merge SP1A.210624.001
Change-Id: I8507f8b65c47a5b425464bbbc8d932a6ca359fd3
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")