summaryrefslogtreecommitdiff
path: root/java/droidstubs_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/droidstubs_test.go')
-rw-r--r--java/droidstubs_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/java/droidstubs_test.go b/java/droidstubs_test.go
index d450c1a80..c6db97901 100644
--- a/java/droidstubs_test.go
+++ b/java/droidstubs_test.go
@@ -15,6 +15,7 @@
package java
import (
+ "reflect"
"strings"
"testing"
@@ -78,6 +79,25 @@ func TestDroidstubs(t *testing.T) {
}
}
+func TestDroidstubsSandbox(t *testing.T) {
+ ctx, _ := testJavaWithFS(t, `
+ droidstubs {
+ name: "bar-stubs",
+ srcs: ["bar-doc/a.java"],
+ sandbox: true,
+ }
+ `,
+ map[string][]byte{
+ "bar-doc/a.java": nil,
+ })
+
+ m := ctx.ModuleForTests("bar-stubs", "android_common")
+ metalava := m.Rule("metalava")
+ if g, w := metalava.Inputs.Strings(), []string{"bar-doc/a.java"}; !reflect.DeepEqual(w, g) {
+ t.Errorf("Expected inputs %q, got %q", w, g)
+ }
+}
+
func TestDroidstubsWithSystemModules(t *testing.T) {
ctx, _ := testJava(t, `
droidstubs {