summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
author Jooyung Han <jooyung@google.com> 2021-01-07 01:28:47 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-01-07 01:28:47 +0000
commit26ab0f1051bfbd0961eb380282625769ff1dbcd5 (patch)
treeb7be96664df1750d8e6fc1a7335823497c62bbd5 /java/java_test.go
parentb5d641ea3f81ec24a6054d2b647ff4a75f6a6f8c (diff)
parente197d8b174208baa68f442b8c50910ad3be1aa34 (diff)
Merge "Add "aidl.flags:" property for cc_/java_ modules"
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/java/java_test.go b/java/java_test.go
index d1ba3dbe4..a2466f995 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -2424,6 +2424,22 @@ func TestAidlExportIncludeDirsFromImports(t *testing.T) {
}
}
+func TestAidlFlagsArePassedToTheAidlCompiler(t *testing.T) {
+ ctx, _ := testJava(t, `
+ java_library {
+ name: "foo",
+ srcs: ["aidl/foo/IFoo.aidl"],
+ aidl: { flags: ["-Werror"], },
+ }
+ `)
+
+ aidlCommand := ctx.ModuleForTests("foo", "android_common").Rule("aidl").RuleParams.Command
+ expectedAidlFlag := "-Werror"
+ if !strings.Contains(aidlCommand, expectedAidlFlag) {
+ t.Errorf("aidl command %q does not contain %q", aidlCommand, expectedAidlFlag)
+ }
+}
+
func TestDataNativeBinaries(t *testing.T) {
ctx, config := testJava(t, `
java_test_host {