summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go16
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)