summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
authorLiz Kammer <eakammer@google.com>2020-07-06 09:12:57 -0700
committerLiz Kammer <eakammer@google.com>2020-07-13 08:57:49 -0700
commit585cac22d9126fc094db3ba8963336d98836cee1 (patch)
tree65cef44793db49648fac04bc1c596a3993e99733 /java/java_test.go
parented62b9cc2a24dd0874f8689902bad759a722497a (diff)
Add array type property flags, equivalent to args
The property args is currently a string, but represents a collection of arguments to metalava/doclava. This has resulted in variables being used rather than default modules to share arguments. Test: go test java_tests Bug: 145644363 Change-Id: I670235e8f1cf19bfe8909049c4765637d0accd47
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go38
1 files changed, 37 insertions, 1 deletions
diff --git a/java/java_test.go b/java/java_test.go
index fb003619f..db3f18740 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -1097,7 +1097,7 @@ func TestDroiddoc(t *testing.T) {
],
proofread_file: "libcore-proofread.txt",
todo_file: "libcore-docs-todo.html",
- args: "-offlinemode -title \"libcore\"",
+ flags: ["-offlinemode -title \"libcore\""],
}
`,
map[string][]byte{
@@ -1124,6 +1124,42 @@ func TestDroiddoc(t *testing.T) {
}
}
+func TestDroiddocArgsAndFlagsCausesError(t *testing.T) {
+ testJavaError(t, "flags is set. Cannot set args", `
+ droiddoc_exported_dir {
+ name: "droiddoc-templates-sdk",
+ path: ".",
+ }
+ filegroup {
+ name: "bar-doc-aidl-srcs",
+ srcs: ["bar-doc/IBar.aidl"],
+ path: "bar-doc",
+ }
+ droiddoc {
+ name: "bar-doc",
+ srcs: [
+ "bar-doc/a.java",
+ "bar-doc/IFoo.aidl",
+ ":bar-doc-aidl-srcs",
+ ],
+ exclude_srcs: [
+ "bar-doc/b.java"
+ ],
+ custom_template: "droiddoc-templates-sdk",
+ hdf: [
+ "android.whichdoc offline",
+ ],
+ knowntags: [
+ "bar-doc/known_oj_tags.txt",
+ ],
+ proofread_file: "libcore-proofread.txt",
+ todo_file: "libcore-docs-todo.html",
+ flags: ["-offlinemode -title \"libcore\""],
+ args: "-offlinemode -title \"libcore\"",
+ }
+ `)
+}
+
func TestDroidstubsWithSystemModules(t *testing.T) {
ctx, _ := testJava(t, `
droidstubs {