aboutsummaryrefslogtreecommitdiff
path: root/subprojects/analysis-kotlin-descriptors/compiler
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-08-30 15:58:46 +0200
committerGitHub <noreply@github.com>2023-08-30 15:58:46 +0200
commitc63ea36637ce956029fb15b1482c0683ecb8a587 (patch)
tree2b75a8a976b43530820e73dc60cce4b10d9fc005 /subprojects/analysis-kotlin-descriptors/compiler
parent0e00edc6fcd406fcf38673ef6a2f8f59e8374de2 (diff)
downloaddokka-c63ea36637ce956029fb15b1482c0683ecb8a587.tar.gz
dokka-c63ea36637ce956029fb15b1482c0683ecb8a587.tar.bz2
dokka-c63ea36637ce956029fb15b1482c0683ecb8a587.zip
Migrate to JUnit 5 and unify used test API (#3138)
Diffstat (limited to 'subprojects/analysis-kotlin-descriptors/compiler')
-rw-r--r--subprojects/analysis-kotlin-descriptors/compiler/build.gradle.kts3
-rw-r--r--subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt13
2 files changed, 8 insertions, 8 deletions
diff --git a/subprojects/analysis-kotlin-descriptors/compiler/build.gradle.kts b/subprojects/analysis-kotlin-descriptors/compiler/build.gradle.kts
index 1b40027d..16f3f75d 100644
--- a/subprojects/analysis-kotlin-descriptors/compiler/build.gradle.kts
+++ b/subprojects/analysis-kotlin-descriptors/compiler/build.gradle.kts
@@ -11,10 +11,9 @@ dependencies {
implementation(projects.subprojects.analysisMarkdownJb)
implementation(projects.subprojects.analysisJavaPsi)
+ testImplementation(kotlin("test"))
testImplementation(projects.core.contentMatcherTestUtils)
testImplementation(projects.core.testApi)
- testImplementation(platform(libs.junit.bom))
- testImplementation(libs.junit.jupiter)
// TODO [beresnev] get rid of it
compileOnly(libs.kotlinx.coroutines.core)
diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt
index 321aba45..b6105b9d 100644
--- a/subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt
+++ b/subprojects/analysis-kotlin-descriptors/compiler/src/test/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ParseModuleAndPackageDocumentationFragmentsTest.kt
@@ -2,16 +2,17 @@ package org.jetbrains.dokka.analysis.kotlin.descriptors
import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.impl.moduledocs.*
-import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.impl.moduledocs.ModuleAndPackageDocumentation.Classifier.*
+import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.impl.moduledocs.ModuleAndPackageDocumentation.Classifier.Module
+import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.impl.moduledocs.ModuleAndPackageDocumentation.Classifier.Package
import org.jetbrains.dokka.analysis.markdown.jb.MARKDOWN_ELEMENT_FILE_NAME
import org.jetbrains.dokka.model.doc.*
import org.jetbrains.dokka.utilities.DokkaLogger
-import org.junit.jupiter.api.Assertions.assertTrue
-import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.assertThrows
import org.junit.jupiter.api.io.TempDir
import java.nio.file.Path
+import kotlin.test.Test
import kotlin.test.assertEquals
+import kotlin.test.assertFailsWith
+import kotlin.test.assertTrue
class ParseModuleAndPackageDocumentationFragmentsTest {
@@ -69,7 +70,7 @@ class ParseModuleAndPackageDocumentationFragmentsTest {
@Test
fun `no module name specified fails`() {
- val exception = assertThrows<IllegalModuleAndPackageDocumentation> {
+ val exception = assertFailsWith<IllegalModuleAndPackageDocumentation> {
parseModuleAndPackageDocumentationFragments(
source(
"""
@@ -137,7 +138,7 @@ class ParseModuleAndPackageDocumentationFragmentsTest {
@Test
fun `white space in package name fails`() {
- val exception = assertThrows<IllegalModuleAndPackageDocumentation> {
+ val exception = assertFailsWith<IllegalModuleAndPackageDocumentation> {
parseModuleAndPackageDocumentationFragments(
source(
"""