diff options
Diffstat (limited to 'java/java_test.go')
-rw-r--r-- | java/java_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/java/java_test.go b/java/java_test.go index a2788cb8e..c4ab13d05 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -1043,6 +1043,12 @@ func TestJavaSdkLibrary(t *testing.T) { libs: ["baz"], sdk_version: "system_current", } + java_library { + name: "baz-test", + srcs: ["c.java"], + libs: ["foo"], + sdk_version: "test_current", + } `) // check the existence of the internal modules @@ -1075,6 +1081,13 @@ func TestJavaSdkLibrary(t *testing.T) { "foo.stubs.jar") } + bazTestJavac := ctx.ModuleForTests("baz-test", "android_common").Rule("javac") + // tests if baz-test is actually linked to the test stubs lib + if !strings.Contains(bazTestJavac.Args["classpath"], "foo.stubs.test.jar") { + t.Errorf("baz-test javac classpath %v does not contain %q", bazTestJavac.Args["classpath"], + "foo.stubs.test.jar") + } + // test if baz has exported SDK lib names foo and bar to qux qux := ctx.ModuleForTests("qux", "android_common") if quxLib, ok := qux.Module().(*Library); ok { |