Skip to content

Commit

Permalink
Move tests to assertion test
Browse files Browse the repository at this point in the history
  • Loading branch information
raghulvelusamy committed Dec 19, 2023
1 parent d48cb0c commit d7405ab
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
13 changes: 13 additions & 0 deletions src/test/data/jvm/ksp/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
load("//kotlin:core.bzl", "kt_ksp_plugin")
load("//kotlin:jvm.bzl", "kt_jvm_library")

# Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
package(default_visibility = ["//visibility:private"])

kt_ksp_plugin(
Expand Down
7 changes: 7 additions & 0 deletions src/test/kotlin/io/bazel/kotlin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,20 @@ kt_rules_e2e_test(
srcs = ["KotlinJvm13Test.kt"],
)

kt_rules_e2e_test(
name = "KotlinJvmKspAssertionTest",
srcs = ["KotlinJvmKspAssertionTest.kt"],
data = ["//src/test/data/jvm/ksp"],
)

test_suite(
name = "assertion_tests",
tests = [
"KotlinJvm13Test",
"KotlinJvmAssociatesBasicVisibilityTest",
"KotlinJvmBasicAssertionTest",
"KotlinJvmKaptAssertionTest",
"KotlinJvmKspAssertionTest",
],
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package io.bazel.kotlin.builder.tasks.jvm
package io.bazel.kotlin

import io.bazel.kotlin.KotlinAssertionTestCase
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4

@RunWith(JUnit4::class)
class KotlinBuilderJvmKspTest: KotlinAssertionTestCase("src/test/data/jvm/ksp") {
class KotlinJvmKspAssertionTest: KotlinAssertionTestCase("src/test/data/jvm/ksp") {

@Test
fun testKSPCopiesAllFilesFromMetaINF() {
Expand Down
9 changes: 1 addition & 8 deletions src/test/kotlin/io/bazel/kotlin/builder/tasks/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

load("@rules_java//java:defs.bzl", "java_library")
load("//src/test/kotlin/io/bazel/kotlin:defs.bzl", "kt_rules_e2e_test", "kt_rules_test")
load("//src/test/kotlin/io/bazel/kotlin:defs.bzl", "kt_rules_test")

java_library(
name = "JdepsParserTestFixtures",
Expand Down Expand Up @@ -107,12 +107,6 @@ kt_rules_test(
],
)

kt_rules_e2e_test(
name = "KotlinKSPMetaFilesCopyTest",
srcs = ["jvm/KotlinBuilderJvmKspTest.kt"],
data = ["//src/test/data/jvm/ksp"],
)

test_suite(
name = "tasks_tests",
tests = [
Expand All @@ -126,6 +120,5 @@ test_suite(
":KotlinBuilderJvmKaptTest",
":KotlinBuilderJvmStrictDepsTest",
":KotlinJvmTaskExecutorTest",
":KotlinKSPMetaFilesCopyTest",
],
)

0 comments on commit d7405ab

Please sign in to comment.