Merge "Enforce hidden api usage in vendor (soong)" am: e65d84c84c

am: 7a22534a47

Change-Id: Iffbacc0f98fb208e6f71919bcefa19cb0e57efca
This commit is contained in:
Jeongik Cha
2019-06-30 19:53:19 -07:00
committed by android-build-merger
4 changed files with 43 additions and 4 deletions

View File

@@ -286,6 +286,32 @@ func TestSimple(t *testing.T) {
}
}
func TestSdkVersion(t *testing.T) {
ctx := testJava(t, `
java_library {
name: "foo",
srcs: ["a.java"],
vendor: true,
}
java_library {
name: "bar",
srcs: ["b.java"],
}
`)
foo := ctx.ModuleForTests("foo", "android_common").Module().(*Library)
bar := ctx.ModuleForTests("bar", "android_common").Module().(*Library)
if foo.sdkVersion() != "system_current" {
t.Errorf("If sdk version of vendor module is empty, it must change to system_current.")
}
if bar.sdkVersion() != "" {
t.Errorf("If sdk version of non-vendor module is empty, it keeps empty.")
}
}
func TestArchSpecific(t *testing.T) {
ctx := testJava(t, `
java_library {