Update to kotest
This commit is contained in:
@ -172,13 +172,8 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.kotlintest</groupId>
|
||||
<artifactId>kotlintest-assertions</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.kotlintest</groupId>
|
||||
<artifactId>kotlintest-core</artifactId>
|
||||
<groupId>io.kotest</groupId>
|
||||
<artifactId>kotest-assertions-core-jvm</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -1,8 +1,8 @@
|
||||
package net.sourceforge.pmd.lang.java.ast
|
||||
|
||||
import io.kotlintest.matchers.collections.shouldContainExactly
|
||||
import io.kotlintest.should
|
||||
import io.kotlintest.shouldBe
|
||||
import io.kotest.matchers.collections.shouldContainExactly
|
||||
import io.kotest.matchers.should
|
||||
import io.kotest.matchers.shouldBe
|
||||
import net.sourceforge.pmd.lang.java.ast.JavaVersion.*
|
||||
import net.sourceforge.pmd.lang.java.ast.JavaVersion.Companion.Earliest
|
||||
import net.sourceforge.pmd.lang.java.ast.JavaVersion.Companion.Latest
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
import io.kotlintest.shouldBe
|
||||
import io.kotest.matchers.shouldBe
|
||||
import net.sourceforge.pmd.lang.java.ast.*
|
||||
import net.sourceforge.pmd.lang.java.ast.JavaVersion.*
|
||||
import net.sourceforge.pmd.lang.java.ast.JavaVersion.Companion.Latest
|
||||
@ -88,4 +88,4 @@ class Java11Test : ParserTestSpec({
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.sourceforge.pmd.lang.java.ast
|
||||
|
||||
import io.kotlintest.matchers.string.shouldContain
|
||||
import io.kotlintest.shouldThrow
|
||||
import io.kotest.assertions.throwables.shouldThrow
|
||||
import io.kotest.matchers.string.shouldContain
|
||||
import net.sourceforge.pmd.lang.ast.Node
|
||||
import net.sourceforge.pmd.lang.ast.test.Assertions
|
||||
import net.sourceforge.pmd.lang.ast.test.NodeSpec
|
||||
@ -56,7 +56,7 @@ enum class JavaVersion : Comparable<JavaVersion> {
|
||||
*
|
||||
* These are implicitly used by [matchExpr] and [matchStmt], which specify a matcher directly
|
||||
* on the strings, using their type parameter and the info in this test context to parse, find
|
||||
* the node, and execute the matcher in a single call. These may be used by [io.kotlintest.should],
|
||||
* the node, and execute the matcher in a single call. These may be used by [io.kotest.matchers.should],
|
||||
* e.g.
|
||||
*
|
||||
* parserTest("Test ShiftExpression operator") {
|
||||
@ -69,7 +69,7 @@ enum class JavaVersion : Comparable<JavaVersion> {
|
||||
* Import statements in the parsing contexts can be configured by adding types to [importedTypes],
|
||||
* or strings to [otherImports].
|
||||
*
|
||||
* Technically the utilities provided by this class may be used outside of [io.kotlintest.specs.FunSpec]s,
|
||||
* Technically the utilities provided by this class may be used outside of [io.kotest.specs.FunSpec]s,
|
||||
* e.g. in regular JUnit tests, but I think we should strive to uniformize our testing style,
|
||||
* especially since KotlinTest defines so many.
|
||||
*
|
||||
|
@ -1,10 +1,12 @@
|
||||
package net.sourceforge.pmd.lang.java.ast
|
||||
|
||||
import io.kotlintest.AbstractSpec
|
||||
import io.kotlintest.TestContext
|
||||
import io.kotlintest.TestType
|
||||
import io.kotest.core.config.Project
|
||||
import io.kotest.core.spec.style.DslDrivenSpec
|
||||
import io.kotest.core.test.TestContext
|
||||
import io.kotest.core.test.TestName
|
||||
import io.kotest.core.test.TestType
|
||||
import net.sourceforge.pmd.lang.ast.test.Assertions
|
||||
import io.kotlintest.should as kotlintestShould
|
||||
import io.kotest.matchers.should as kotlintestShould
|
||||
|
||||
/**
|
||||
* Base class for grammar tests that use the DSL. Tests are layered into
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.java.ast
|
||||
|
||||
import io.kotlintest.shouldBe
|
||||
import io.kotest.matchers.shouldBe
|
||||
|
||||
/**
|
||||
* @author Clément Fournier
|
||||
|
@ -1,6 +1,6 @@
|
||||
package net.sourceforge.pmd.lang.java.ast
|
||||
|
||||
import io.kotlintest.shouldBe
|
||||
import io.kotest.matchers.shouldBe
|
||||
|
||||
class WildcardBoundsTest : ParserTestSpec({
|
||||
|
||||
|
Reference in New Issue
Block a user