diff options
| author | 2020-05-08 17:01:50 +0000 | |
|---|---|---|
| committer | 2020-05-08 17:01:50 +0000 | |
| commit | d34bc09aa17e9ef741d8cc6612197f06e8c70cfd (patch) | |
| tree | 5778cc11f9c960d78baa305391563888bff71f1d /java/java_test.go | |
| parent | ad521eeb14e643517dc5e8bcacc91f1fb5c22c59 (diff) | |
| parent | 3375e35d99b428460f0dd8404c74a9e1ccb0b5ab (diff) | |
Merge "java_sdk_library: Control API surfaces generated"
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/java/java_test.go b/java/java_test.go index e8a1a7c83..0033f319d 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -1229,6 +1229,24 @@ func TestJavaSdkLibrary(t *testing.T) {  	}  } +func TestJavaSdkLibrary_InvalidScopes(t *testing.T) { +	testJavaError(t, `module "foo": enabled api scope "system" depends on disabled scope "public"`, ` +		java_sdk_library { +			name: "foo", +			srcs: ["a.java", "b.java"], +			api_packages: ["foo"], +			// Explicitly disable public to test the check that ensures the set of enabled +			// scopes is consistent. +			public: { +				enabled: false, +			}, +			system: { +				enabled: true, +			}, +		} +		`) +} +  var compilerFlagsTestCases = []struct {  	in  string  	out bool |