diff options
Diffstat (limited to 'java/java_test.go')
-rw-r--r-- | java/java_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/java/java_test.go b/java/java_test.go index 16782967c..96bf22436 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -1095,6 +1095,12 @@ func TestJavaSdkLibrary(t *testing.T) { libs: ["foo", "bar"], sdk_version: "system_current", } + java_library { + name: "qux", + srcs: ["c.java"], + libs: ["baz"], + sdk_version: "system_current", + } `) // check the existence of the internal modules @@ -1127,4 +1133,13 @@ func TestJavaSdkLibrary(t *testing.T) { t.Errorf("baz javac classpath %v should not contain %q", bazJavac.Args["classpath"], "foo.stubs.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 { + sdkLibs := quxLib.ExportedSdkLibs() + if len(sdkLibs) != 2 || !android.InList("foo", sdkLibs) || !android.InList("bar", sdkLibs) { + t.Errorf("qux should export \"foo\" and \"bar\" but exports %v", sdkLibs) + } + } } |