diff options
| author | 2017-10-04 14:43:10 +0000 | |
|---|---|---|
| committer | 2017-10-04 14:43:10 +0000 | |
| commit | 8b30a5599daf3810695704160a48c61390740e3e (patch) | |
| tree | 35fdf8bc2ac70c444802c2244603f2ce9aee85da /java/java_test.go | |
| parent | c144b8601430e5de53d832dff0c4e2bbf1d2ff4c (diff) | |
| parent | 965714f13942350b770a7985a473ccb6a414f406 (diff) | |
Merge "Fix bootclasspath for host variants of java_library modules"
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/java/java_test.go b/java/java_test.go index 2b92f49e7..a4a3f52bf 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -185,6 +185,7 @@ func TestArchSpecific(t *testing.T) { var classpathTestcases = []struct { name string + moduleType string host android.OsClass properties string bootclasspath []string @@ -239,27 +240,41 @@ var classpathTestcases = []struct { { name: "host default", - host: android.Host, + moduleType: "java_library_host", properties: ``, + host: android.Host, classpath: []string{}, }, { name: "host nostdlib", + moduleType: "java_library_host", host: android.Host, properties: `no_standard_libs: true`, classpath: []string{}, }, + { + + name: "host supported default", + host: android.Host, + properties: `host_supported: true,`, + classpath: []string{}, + }, + { + name: "host supported nostdlib", + host: android.Host, + properties: `host_supported: true, no_standard_libs: true`, + classpath: []string{}, + }, } func TestClasspath(t *testing.T) { for _, testcase := range classpathTestcases { t.Run(testcase.name, func(t *testing.T) { - hostExtra := "" - if testcase.host == android.Host { - hostExtra = "_host" + moduleType := "java_library" + if testcase.moduleType != "" { + moduleType = testcase.moduleType } - ctx := testJava(t, ` - java_library`+hostExtra+` { + ctx := testJava(t, moduleType+` { name: "foo", srcs: ["a.java"], `+testcase.properties+` |