Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d14e5c6e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add some more visibility test cases."

parents 18bb34d6 8edeb637
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
package android

import (
	"github.com/google/blueprint"
	"io/ioutil"
	"os"
	"testing"

	"github.com/google/blueprint"
)

var visibilityTests = []struct {
@@ -198,10 +199,17 @@ var visibilityTests = []struct {
					name: "libnested",
					deps: ["libexample"],
				}`),
			"other/Blueprints": []byte(`
				mock_library {
					name: "libother",
					deps: ["libexample"],
				}`),
		},
		expectedErrors: []string{
			`module "libnested" variant "android_common": depends on //top:libexample which is not` +
				` visible to this module; //top:libexample is only visible to \[//top:__pkg__\]`,
			`module "libother" variant "android_common": depends on //top:libexample which is not` +
				` visible to this module; //top:libexample is only visible to \[//top:__pkg__\]`,
		},
	},
	{
@@ -223,10 +231,17 @@ var visibilityTests = []struct {
					name: "libnested",
					deps: ["libexample"],
				}`),
			"other/Blueprints": []byte(`
				mock_library {
					name: "libother",
					deps: ["libexample"],
				}`),
		},
		expectedErrors: []string{
			`module "libnested" variant "android_common": depends on //top:libexample which is not` +
				` visible to this module; //top:libexample is only visible to \[//top:__pkg__\]`,
			`module "libother" variant "android_common": depends on //top:libexample which is not` +
				` visible to this module; //top:libexample is only visible to \[//top:__pkg__\]`,
		},
	},
	{