diff options
Diffstat (limited to 'java/java_test.go')
-rw-r--r-- | java/java_test.go | 16 |
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 { |