aboutsummaryrefslogtreecommitdiff
path: root/apex/classpath_element_test.go
diff options
context:
space:
mode:
authormosimchah <mosimchah@gmail.com>2025-12-02 09:27:38 -0500
committermosimchah <mosimchah@gmail.com>2025-12-02 09:27:38 -0500
commitc7bade461dc55726f62997d13a48582f7c4b4655 (patch)
treeea0588da76060a2038f54f67efd046ca77634b10 /apex/classpath_element_test.go
parent0f5414d19317805e8bbbe7c4db5f0fd78769bad5 (diff)
parent89d78cff8b00d3b20a90074635c3fe5a2ee49474 (diff)
Merge branch 'lineage-23.1' of https://github.com/LineageOS/android_build_soong into HEADw16.1
* 'lineage-23.1' of https://github.com/LineageOS/android_build_soong: (528 commits) Revert "install_symlink: Make symlink target configurable" Reapply "Clear as much of cc.Module as possible after GenerateBuildActions" Revert "rust: config: Fix missing CPU variant LD flags in Rust" Rename build-flag in outdir Revert^4 "cipd: Default CIPD proxy server to on, add opt-out" Convert check-vintf-all to phony with actions Create a partial implementation of check-vintf-all for soong-only Configure RBE rust pool based on build variant Revert^3 "Add sdk version check to arr" Add jdk.internal.invoke to the allowlist Make droid always depend on symbols zip Import Device and Odm skus Don't install gob_gen in Soong Remove bazel reference from run_integration_tests.sh Fix bootstrap_test.sh Don't panic in aconfig libraries when AllowMissingDependencies is set Avoid returning nil paths from PathForModuleSrc Revert "Flag controled clang version" Rework module target dependencies on required deps Revert^2 "Add sdk version check to arr" ... Change-Id: I6e9a63fa14fda917a42e426e5dcebbad7f67e1de
Diffstat (limited to 'apex/classpath_element_test.go')
-rw-r--r--apex/classpath_element_test.go54
1 files changed, 27 insertions, 27 deletions
diff --git a/apex/classpath_element_test.go b/apex/classpath_element_test.go
index c2f2fc5b9..41fe16d56 100644
--- a/apex/classpath_element_test.go
+++ b/apex/classpath_element_test.go
@@ -29,7 +29,7 @@ import (
type testClasspathElementContext struct {
android.OtherModuleProviderContext
testContext *android.TestContext
- module android.Module
+ module android.ModuleProxy
errs []error
}
@@ -198,18 +198,18 @@ func TestCreateClasspathElements(t *testing.T) {
result := preparer.RunTest(t)
- artFragment := result.Module("art-bootclasspath-fragment", "android_common_com.android.art")
- artBaz := result.Module("baz", "android_common_apex10000")
- artQuuz := result.Module("quuz", "android_common_apex10000")
+ artFragment := result.ModuleProxy("art-bootclasspath-fragment", "android_common_com.android.art")
+ artBaz := result.ModuleProxy("baz", "android_common_apex10000")
+ artQuuz := result.ModuleProxy("quuz", "android_common_apex10000")
- myFragment := result.Module("mybootclasspath-fragment", "android_common_myapex")
- myBar := result.Module("bar", "android_common_apex10000")
+ myFragment := result.ModuleProxy("mybootclasspath-fragment", "android_common_myapex")
+ myBar := result.ModuleProxy("bar", "android_common_apex10000")
- otherApexLibrary := result.Module("otherapexlibrary", "android_common_apex10000")
+ otherApexLibrary := result.ModuleProxy("otherapexlibrary", "android_common_apex10000")
- platformFoo := result.Module("quuz", "android_common")
+ platformFoo := result.ModuleProxy("quuz", "android_common")
- bootclasspath := result.Module("myplatform-bootclasspath", "android_common")
+ bootclasspath := result.ModuleProxy("myplatform-bootclasspath", "android_common")
// Use a custom assertion method instead of AssertDeepEquals as the latter formats the output
// using %#v which results in meaningless output as ClasspathElements are pointers.
@@ -219,10 +219,10 @@ func TestCreateClasspathElements(t *testing.T) {
}
}
- expectFragmentElement := func(module android.Module, contents ...android.Module) java.ClasspathElement {
+ expectFragmentElement := func(module android.ModuleProxy, contents ...android.ModuleProxy) java.ClasspathElement {
return &java.ClasspathFragmentElement{module, contents}
}
- expectLibraryElement := func(module android.Module) java.ClasspathElement {
+ expectLibraryElement := func(module android.ModuleProxy) java.ClasspathElement {
return &java.ClasspathLibraryElement{module}
}
@@ -239,10 +239,10 @@ func TestCreateClasspathElements(t *testing.T) {
t.Parallel()
ctx := newCtx()
elements := java.CreateClasspathElements(ctx,
- []android.Module{artBaz, artQuuz, myBar, platformFoo},
- []android.Module{artFragment, myFragment},
- map[android.Module]string{artBaz: "com.android.art", artQuuz: "com.android.art", myBar: "myapex"},
- map[string]android.Module{"com.android.art": artFragment, "myapex": myFragment})
+ []android.ModuleProxy{artBaz, artQuuz, myBar, platformFoo},
+ []android.ModuleProxy{artFragment, myFragment},
+ map[android.ModuleProxy]string{artBaz: "com.android.art", artQuuz: "com.android.art", myBar: "myapex"},
+ map[string]android.ModuleProxy{"com.android.art": artFragment, "myapex": myFragment})
expectedElements := java.ClasspathElements{
expectFragmentElement(artFragment, artBaz, artQuuz),
expectFragmentElement(myFragment, myBar),
@@ -257,10 +257,10 @@ func TestCreateClasspathElements(t *testing.T) {
t.Parallel()
ctx := newCtx()
elements := java.CreateClasspathElements(ctx,
- []android.Module{artBaz, myBar, artQuuz, platformFoo},
- []android.Module{artFragment, myFragment},
- map[android.Module]string{artBaz: "com.android.art", artQuuz: "com.android.art", myBar: "myapex"},
- map[string]android.Module{"com.android.art": artFragment, "myapex": myFragment})
+ []android.ModuleProxy{artBaz, myBar, artQuuz, platformFoo},
+ []android.ModuleProxy{artFragment, myFragment},
+ map[android.ModuleProxy]string{artBaz: "com.android.art", artQuuz: "com.android.art", myBar: "myapex"},
+ map[string]android.ModuleProxy{"com.android.art": artFragment, "myapex": myFragment})
expectedElements := java.ClasspathElements{
expectFragmentElement(artFragment, artBaz, artQuuz),
expectFragmentElement(myFragment, myBar),
@@ -276,10 +276,10 @@ func TestCreateClasspathElements(t *testing.T) {
t.Parallel()
ctx := newCtx()
elements := java.CreateClasspathElements(ctx,
- []android.Module{artBaz, platformFoo, artQuuz, myBar},
- []android.Module{artFragment, myFragment},
- map[android.Module]string{artBaz: "com.android.art", artQuuz: "com.android.art", myBar: "myapex"},
- map[string]android.Module{"com.android.art": artFragment, "myapex": myFragment})
+ []android.ModuleProxy{artBaz, platformFoo, artQuuz, myBar},
+ []android.ModuleProxy{artFragment, myFragment},
+ map[android.ModuleProxy]string{artBaz: "com.android.art", artQuuz: "com.android.art", myBar: "myapex"},
+ map[string]android.ModuleProxy{"com.android.art": artFragment, "myapex": myFragment})
expectedElements := java.ClasspathElements{
expectFragmentElement(artFragment, artBaz, artQuuz),
expectLibraryElement(platformFoo),
@@ -296,10 +296,10 @@ func TestCreateClasspathElements(t *testing.T) {
t.Parallel()
ctx := newCtx()
elements := java.CreateClasspathElements(ctx,
- []android.Module{artBaz, otherApexLibrary},
- []android.Module{artFragment},
- map[android.Module]string{artBaz: "com.android.art", otherApexLibrary: "otherapex"},
- map[string]android.Module{"com.android.art": artFragment})
+ []android.ModuleProxy{artBaz, otherApexLibrary},
+ []android.ModuleProxy{artFragment},
+ map[android.ModuleProxy]string{artBaz: "com.android.art", otherApexLibrary: "otherapex"},
+ map[string]android.ModuleProxy{"com.android.art": artFragment})
expectedElements := java.ClasspathElements{
expectFragmentElement(artFragment, artBaz),
}