summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment_test.go
diff options
context:
space:
mode:
authorHaamed Gheibi <haamed@google.com>2021-07-16 22:06:52 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-07-16 22:06:52 +0000
commitf0dd5152a12c045deb95609ef47da5e6cd7c13be (patch)
tree8a151da47606af4442fd95f3d62c68326fcd516a /java/bootclasspath_fragment_test.go
parente64464306404bb00c04190e2e44cb0952e824646 (diff)
parentd4fd974eb42fa9bc991011d544a48157aa8e95a7 (diff)
Merge "Merge SP1A.210709.002" into s-keystone-qcom-dev
Diffstat (limited to 'java/bootclasspath_fragment_test.go')
-rw-r--r--java/bootclasspath_fragment_test.go27
1 files changed, 22 insertions, 5 deletions
diff --git a/java/bootclasspath_fragment_test.go b/java/bootclasspath_fragment_test.go
index fba7d1a71..3d0e1558f 100644
--- a/java/bootclasspath_fragment_test.go
+++ b/java/bootclasspath_fragment_test.go
@@ -197,7 +197,7 @@ func TestBootclasspathFragment_StubLibs(t *testing.T) {
],
},
core_platform_api: {
- stub_libs: ["mycoreplatform"],
+ stub_libs: ["mycoreplatform.stubs"],
},
}
@@ -245,17 +245,34 @@ func TestBootclasspathFragment_StubLibs(t *testing.T) {
otherPublicStubsJar := "out/soong/.intermediates/myothersdklibrary.stubs/android_common/dex/myothersdklibrary.stubs.jar"
// Check that SdkPublic uses public stubs for all sdk libraries.
- android.AssertPathsRelativeToTopEquals(t, "public dex stubs jar", []string{otherPublicStubsJar, publicStubsJar, stubsJar}, info.TransitiveStubDexJarsByKind[android.SdkPublic])
+ android.AssertPathsRelativeToTopEquals(t, "public dex stubs jar", []string{otherPublicStubsJar, publicStubsJar, stubsJar}, info.TransitiveStubDexJarsByScope.StubDexJarsForScope(PublicHiddenAPIScope))
// Check that SdkSystem uses system stubs for mysdklibrary and public stubs for myothersdklibrary
// as it does not provide system stubs.
- android.AssertPathsRelativeToTopEquals(t, "system dex stubs jar", []string{otherPublicStubsJar, systemStubsJar, stubsJar}, info.TransitiveStubDexJarsByKind[android.SdkSystem])
+ android.AssertPathsRelativeToTopEquals(t, "system dex stubs jar", []string{otherPublicStubsJar, systemStubsJar, stubsJar}, info.TransitiveStubDexJarsByScope.StubDexJarsForScope(SystemHiddenAPIScope))
// Check that SdkTest also uses system stubs for mysdklibrary as it does not provide test stubs
// and public stubs for myothersdklibrary as it does not provide test stubs either.
- android.AssertPathsRelativeToTopEquals(t, "test dex stubs jar", []string{otherPublicStubsJar, systemStubsJar, stubsJar}, info.TransitiveStubDexJarsByKind[android.SdkTest])
+ android.AssertPathsRelativeToTopEquals(t, "test dex stubs jar", []string{otherPublicStubsJar, systemStubsJar, stubsJar}, info.TransitiveStubDexJarsByScope.StubDexJarsForScope(TestHiddenAPIScope))
// Check that SdkCorePlatform uses public stubs from the mycoreplatform library.
corePlatformStubsJar := "out/soong/.intermediates/mycoreplatform.stubs/android_common/dex/mycoreplatform.stubs.jar"
- android.AssertPathsRelativeToTopEquals(t, "core platform dex stubs jar", []string{corePlatformStubsJar}, info.TransitiveStubDexJarsByKind[android.SdkCorePlatform])
+ android.AssertPathsRelativeToTopEquals(t, "core platform dex stubs jar", []string{corePlatformStubsJar}, info.TransitiveStubDexJarsByScope.StubDexJarsForScope(CorePlatformHiddenAPIScope))
+
+ // Check the widest stubs.. The list contains the widest stub dex jar provided by each module.
+ expectedWidestPaths := []string{
+ // mycoreplatform's widest API is core platform.
+ corePlatformStubsJar,
+
+ // myothersdklibrary's widest API is public.
+ otherPublicStubsJar,
+
+ // sdklibrary's widest API is system.
+ systemStubsJar,
+
+ // mystublib's only provides one API and so it must be the widest.
+ stubsJar,
+ }
+
+ android.AssertPathsRelativeToTopEquals(t, "widest dex stubs jar", expectedWidestPaths, info.TransitiveStubDexJarsByScope.StubDexJarsForWidestAPIScope())
}