Remove Spek add Kotest
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
org.openrndr.extra.convention.`kotlin-multiplatform`
|
||||
alias(libs.plugins.kotest.multiplatform)
|
||||
}
|
||||
|
||||
val embedShaders = tasks.register<EmbedShadersTask>("embedShaders") {
|
||||
@@ -11,17 +12,8 @@ val embedShaders = tasks.register<EmbedShadersTask>("embedShaders") {
|
||||
}.get()
|
||||
|
||||
kotlin {
|
||||
jvm {
|
||||
testRuns["test"].executionTask {
|
||||
useJUnitPlatform {
|
||||
includeEngines("spek2")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.sourceSets.getByName("commonMain").kotlin.srcDir(embedShaders.outputDir)
|
||||
sourceSets {
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(libs.openrndr.math)
|
||||
@@ -33,16 +25,13 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val jvmTest by getting {
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
implementation(libs.spek.dsl)
|
||||
runtimeOnly(libs.spek.junit5)
|
||||
runtimeOnly(libs.kotlin.reflect)
|
||||
implementation(libs.kotest.assertions)
|
||||
implementation(libs.kotest.framework.engine)
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val jvmDemo by getting {
|
||||
dependencies {
|
||||
implementation(project(":orx-hash-grid"))
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import io.kotest.core.spec.style.DescribeSpec
|
||||
import org.openrndr.extra.noise.*
|
||||
import org.spekframework.spek2.Spek
|
||||
import org.spekframework.spek2.style.specification.describe
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
object TestGradient : Spek({
|
||||
class TestGradient : DescribeSpec({
|
||||
describe("Noise") {
|
||||
it("has a gradient") {
|
||||
gradient1D(::perlinLinear, 100, 0.1)
|
||||
@@ -1,9 +1,8 @@
|
||||
import io.kotest.core.spec.style.DescribeSpec
|
||||
import org.openrndr.extra.noise.fastFloor
|
||||
import org.spekframework.spek2.Spek
|
||||
import org.spekframework.spek2.style.specification.describe
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
object TestMathUtils : Spek({
|
||||
class TestMathUtils : DescribeSpec({
|
||||
describe("Fast floor") {
|
||||
it("it is corrrect for 0.0") {
|
||||
assertEquals(0, 0.0.fastFloor())
|
||||
@@ -1,11 +1,11 @@
|
||||
import io.kotest.core.spec.style.DescribeSpec
|
||||
import org.openrndr.extra.noise.Random
|
||||
import org.openrndr.extra.noise.perlinQuintic
|
||||
import org.openrndr.math.Vector4
|
||||
import org.spekframework.spek2.Spek
|
||||
import org.spekframework.spek2.style.specification.describe
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
object TestVectorShortcutFunctions : Spek({
|
||||
class TestVectorShortcutFunctions : DescribeSpec({
|
||||
|
||||
val v = Vector4(1.13, 2.74, 3.59, 4.83)
|
||||
|
||||
Reference in New Issue
Block a user