summaryrefslogtreecommitdiff
path: root/java/sdk_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/sdk_test.go')
-rw-r--r--java/sdk_test.go40
1 files changed, 23 insertions, 17 deletions
diff --git a/java/sdk_test.go b/java/sdk_test.go
index 28b962432..ed874e543 100644
--- a/java/sdk_test.go
+++ b/java/sdk_test.go
@@ -25,27 +25,29 @@ import (
"android/soong/java/config"
)
-func TestClasspath(t *testing.T) {
- const frameworkAidl = "-I" + defaultJavaDir + "/framework/aidl"
- var classpathTestcases = []struct {
- name string
- unbundled bool
- moduleType string
- host android.OsClass
- properties string
+type classpathTestCase struct {
+ name string
+ unbundled bool
+ moduleType string
+ host android.OsClass
+ properties string
- // for java 8
- bootclasspath []string
- java8classpath []string
+ // for java 8
+ bootclasspath []string
+ java8classpath []string
- // for java 9
- system string
- java9classpath []string
+ // for java 9
+ system string
+ java9classpath []string
- forces8 bool // if set, javac will always be called with java 8 arguments
+ forces8 bool // if set, javac will always be called with java 8 arguments
+
+ aidl string
+}
- aidl string
- }{
+func TestClasspath(t *testing.T) {
+ const frameworkAidl = "-I" + defaultJavaDir + "/framework/aidl"
+ var classpathTestcases = []classpathTestCase{
{
name: "default",
bootclasspath: config.StableCorePlatformBootclasspathLibraries,
@@ -295,6 +297,10 @@ func TestClasspath(t *testing.T) {
},
}
+ testClasspathTestCases(t, classpathTestcases)
+}
+
+func testClasspathTestCases(t *testing.T, classpathTestcases []classpathTestCase) {
for _, testcase := range classpathTestcases {
t.Run(testcase.name, func(t *testing.T) {
moduleType := "java_library"