diff options
| author | 2020-05-25 01:55:59 +0000 | |
|---|---|---|
| committer | 2020-05-25 02:06:07 +0000 | |
| commit | 58e4165b601cd23894f9175b372454697ff18130 (patch) | |
| tree | 5931d64b96de74b18955b73fc98945445b99ecca /java/java_test.go | |
| parent | 43e173498514238f6979cae80e7d6b36e628cd7d (diff) | |
Revert "java_sdk_library: Access outputs using tags"
Revert submission 11569833
Reason for revert: Broke presubmit: b/157231582
Reverted Changes:
Ia99def91e:Improve tracking of exported sdk libraries
If91b4d106:java_sdk_library: Do not expose stubs implementati...
Id6d76e56c:java_sdk_library: Access outputs using tags
Change-Id: Icf7091bf0068ad16835013b1003527948a5c998f
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/java/java_test.go b/java/java_test.go index 4f3a803ff..16200119e 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -1230,113 +1230,6 @@ func TestJavaSdkLibrary(t *testing.T) { } } -func TestJavaSdkLibrary_UseSourcesFromAnotherSdkLibrary(t *testing.T) { - testJava(t, ` - java_sdk_library { - name: "foo", - srcs: ["a.java"], - api_packages: ["foo"], - public: { - enabled: true, - }, - } - - java_library { - name: "bar", - srcs: ["b.java", ":foo{.public.stubs.source}"], - } - `) -} - -func TestJavaSdkLibrary_AccessOutputFiles_MissingScope(t *testing.T) { - testJavaError(t, `"foo" does not provide api scope system`, ` - java_sdk_library { - name: "foo", - srcs: ["a.java"], - api_packages: ["foo"], - public: { - enabled: true, - }, - } - - java_library { - name: "bar", - srcs: ["b.java", ":foo{.system.stubs.source}"], - } - `) -} - -func TestJavaSdkLibraryImport_AccessOutputFiles(t *testing.T) { - testJava(t, ` - java_sdk_library_import { - name: "foo", - public: { - jars: ["a.jar"], - stub_srcs: ["a.java"], - current_api: "api/current.txt", - removed_api: "api/removed.txt", - }, - } - - java_library { - name: "bar", - srcs: [":foo{.public.stubs.source}"], - java_resources: [ - ":foo{.public.api.txt}", - ":foo{.public.removed-api.txt}", - ], - } - `) -} - -func TestJavaSdkLibraryImport_AccessOutputFiles_Invalid(t *testing.T) { - bp := ` - java_sdk_library_import { - name: "foo", - public: { - jars: ["a.jar"], - }, - } - ` - - t.Run("stubs.source", func(t *testing.T) { - testJavaError(t, `stubs.source not available for api scope public`, bp+` - java_library { - name: "bar", - srcs: [":foo{.public.stubs.source}"], - java_resources: [ - ":foo{.public.api.txt}", - ":foo{.public.removed-api.txt}", - ], - } - `) - }) - - t.Run("api.txt", func(t *testing.T) { - testJavaError(t, `api.txt not available for api scope public`, bp+` - java_library { - name: "bar", - srcs: ["a.java"], - java_resources: [ - ":foo{.public.api.txt}", - ], - } - `) - }) - - t.Run("removed-api.txt", func(t *testing.T) { - testJavaError(t, `removed-api.txt not available for api scope public`, bp+` - java_library { - name: "bar", - srcs: ["a.java"], - java_resources: [ - ":foo{.public.removed-api.txt}", - ], - } - `) - }) -} - func TestJavaSdkLibrary_InvalidScopes(t *testing.T) { testJavaError(t, `module "foo": enabled api scope "system" depends on disabled scope "public"`, ` java_sdk_library { |