aboutsummaryrefslogtreecommitdiff
path: root/tests/analysis/jvm_library_test.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/analysis/jvm_library_test.bzl')
-rw-r--r--tests/analysis/jvm_library_test.bzl124
1 files changed, 0 insertions, 124 deletions
diff --git a/tests/analysis/jvm_library_test.bzl b/tests/analysis/jvm_library_test.bzl
index 9e169ea..6435cc5 100644
--- a/tests/analysis/jvm_library_test.bzl
+++ b/tests/analysis/jvm_library_test.bzl
@@ -120,14 +120,6 @@ _test = analysistest.make(
jvm_library_test = _test
-def kt_jvm_library_under_test(name, **kwargs):
- kt_jvm_library(
- name = name,
- tags = ONLY_FOR_ANALYSIS_TEST_TAGS,
- **kwargs
- )
- return name
-
def _coverage_test_impl(ctx):
env = analysistest.begin(ctx)
target_under_test = analysistest.target_under_test(env)
@@ -155,77 +147,6 @@ _coverage_test = analysistest.make(
def _extract_data_runfiles(target):
return [f.basename for f in target[DefaultInfo].data_runfiles.files.to_list()]
-def _test_kt_jvm_library_with_deps():
- test_name = "kt_jvm_library_with_deps_test"
-
- kt_jvm_library(
- name = test_name + "_kt_dep",
- srcs = [create_file(
- name = test_name + "/Hello.kt",
- content = """
-package test
-
-fun hello(): String = "Hello!"
-""",
- )],
- )
- native.java_library(
- name = test_name + "_java_dep",
- srcs = ["testinputs/Foo.java"],
- )
- kt_jvm_library(
- name = test_name + "_tut",
- srcs = [
- create_file(
- name = test_name + "/Hi.kt",
- content = """
-package test
-
-fun hi(): String = "Hi!"
-""",
- ),
- "testinputs/Bar.java",
- ],
- deps = [
- test_name + "_kt_dep",
- test_name + "_java_dep",
- ],
- )
- _test(
- name = test_name,
- target_under_test = test_name + "_tut",
- )
- return test_name
-
-def _test_kt_jvm_library_with_runtime_deps():
- test_name = "kt_jvm_library_with_runtime_deps_test"
- create_file(
- name = test_name + "/Salutations.kt",
- content = """
-package test
-
-fun greeting(): String = "Hello World!"
-""",
- )
- native.java_library(
- name = test_name + "_dep",
- srcs = [],
- )
- kt_jvm_library(
- name = test_name + "_tut",
- srcs = [
- test_name + "/Salutations.kt",
- ],
- runtime_deps = [
- test_name + "_dep",
- ],
- )
- _test(
- name = test_name,
- target_under_test = test_name + "_tut",
- )
- return test_name
-
def _test_kt_jvm_library_with_proguard_specs():
test_name = "kt_jvm_library_with_proguard_specs_test"
create_file(
@@ -291,48 +212,6 @@ Hi!
)
return test_name
-def _test_kt_jvm_library_with_data():
- test_name = "kt_jvm_library_with_data_test"
- kt_jvm_lib_name = test_name + "_tut"
-
- data_txt = create_file(
- name = test_name + "data.txt",
- content = """
-Hello World!
-""",
- )
-
- # Kotlin file
- muchdata_kt = create_file(
- name = test_name + "/MuchData.kt",
- content = """
-package test
-
-import java.io.File
-
-fun greeting(): String = File("data.txt").readText()
-""",
- )
-
- kt_jvm_library(
- name = kt_jvm_lib_name,
- srcs = [muchdata_kt],
- data = [data_txt],
- )
-
- _test(
- name = test_name,
- target_under_test = kt_jvm_lib_name,
- expected = dict(
- data = [
- data_txt,
- # libX.jar is always in data_runfiles as well - just append it.
- "lib%s.jar" % kt_jvm_lib_name,
- ],
- ),
- )
- return test_name
-
def _test_kt_jvm_library_with_plugin():
test_name = "kt_jvm_library_with_plugin_test"
create_file(
@@ -752,8 +631,6 @@ def test_suite(name):
_test_kt_jvm_library_dep_on_exported_plugin(),
_test_kt_jvm_library_java_dep_on_exported_plugin(),
_test_kt_jvm_library_no_kt_srcs_with_plugin(),
- _test_kt_jvm_library_with_data(),
- _test_kt_jvm_library_with_deps(),
_test_kt_jvm_library_with_export_that_exports_plugin(),
_test_kt_jvm_library_with_exported_plugin(),
_test_kt_jvm_library_with_exports(),
@@ -763,7 +640,6 @@ def test_suite(name):
_test_kt_jvm_library_with_plugin(),
_test_kt_jvm_library_with_proguard_specs(),
_test_kt_jvm_library_with_resources(),
- _test_kt_jvm_library_with_runtime_deps(),
_test_kt_jvm_library_coverage(),
],
)