diff options
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/java/java_test.go b/java/java_test.go index ffa3e2b17..2b92f49e7 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -139,7 +139,7 @@ func TestSimple(t *testing.T) { name: "baz", srcs: ["c.java"], } - `) + `) javac := ctx.ModuleForTests("foo", "android_common").Rule("javac") combineJar := ctx.ModuleForTests("foo", "android_common").Rule("combineJar") @@ -164,6 +164,25 @@ func TestSimple(t *testing.T) { } } +func TestArchSpecific(t *testing.T) { + ctx := testJava(t, ` + java_library { + name: "foo", + srcs: ["a.java"], + target: { + android: { + srcs: ["b.java"], + }, + }, + } + `) + + javac := ctx.ModuleForTests("foo", "android_common").Rule("javac") + if len(javac.Inputs) != 2 || javac.Inputs[0].String() != "a.java" || javac.Inputs[1].String() != "b.java" { + t.Errorf(`foo inputs %v != ["a.java", "b.java"]`, javac.Inputs) + } +} + var classpathTestcases = []struct { name string host android.OsClass |
