diff options
| author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-10-06 00:56:19 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-06 00:56:19 +0000 |
| commit | a221b16e026b68fc00f6902eadbd62754e1bd11e (patch) | |
| tree | e3dd1cbe4d6adf172dfc73efd0870908c8753211 /java/java_test.go | |
| parent | 9d7bee729a82b581a10654025c8b84ebcc5f37e8 (diff) | |
| parent | af9c55b780c713676670b83f20f6dda7101817a6 (diff) | |
Merge "Correctly add dependencies to java_resource_dirs files"
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/java/java_test.go b/java/java_test.go index a4a3f52bf..c2c7ee265 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -408,16 +408,16 @@ func TestResources(t *testing.T) { args string }{ { - // Test that a module with java_resource_dirs includes a file list file + // Test that a module with java_resource_dirs includes the files name: "resource dirs", prop: `java_resource_dirs: ["res"]`, - args: "-C res -l ", + args: "-C res -f res/a -f res/b", }, { // Test that a module with java_resources includes the files name: "resource files", prop: `java_resources: ["res/a", "res/b"]`, - args: "-C . -f res/a -C . -f res/b", + args: "-C . -f res/a -f res/b", }, { // Test that a module with a filegroup in java_resources includes the files with the @@ -430,13 +430,13 @@ func TestResources(t *testing.T) { path: "res", srcs: ["res/a", "res/b"], }`, - args: "-C res -f res/a -C res -f res/b", + args: "-C res -f res/a -f res/b", }, { // Test that a module with "include_srcs: true" includes its source files in the resources jar name: "include sources", prop: `include_srcs: true`, - args: "-C . -f a.java -C . -f b.java -C . -f c.java", + args: "-C . -f a.java -f b.java -f c.java", }, } @@ -462,8 +462,8 @@ func TestResources(t *testing.T) { foo.Inputs.Strings(), fooRes.Output.String()) } - if !strings.Contains(fooRes.Args["jarArgs"], test.args) { - t.Errorf("foo resource jar args %q does not contain %q", + if fooRes.Args["jarArgs"] != test.args { + t.Errorf("foo resource jar args %q is not %q", fooRes.Args["jarArgs"], test.args) } }) @@ -489,7 +489,7 @@ func TestExcludeResources(t *testing.T) { fooRes := ctx.ModuleForTests("foo", "android_common").Output("res.jar") - expected := "-C res -l " + fooRes.Implicits[0].String() + expected := "-C res -f res/a -f res/b" if fooRes.Args["jarArgs"] != expected { t.Errorf("foo resource jar args %q is not %q", fooRes.Args["jarArgs"], expected) |
