diff --git a/build.gradle b/build.gradle index d0799c72..02bbe74c 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,9 @@ plugins { //} project.ext { - openrndrVersion = "0.3.35-rc1" + openrndrVersion = "0.3.35" + kotlinVersion = "1.3.41" + spekVersion = "2.0.6" } allprojects { @@ -66,13 +68,25 @@ allprojects { maven { url = "https://dl.bintray.com/openrndr/openrndr" } + + + maven { + url "https://dl.bintray.com/spekframework/spek" + } + + } dependencies { compile "org.openrndr:openrndr-core:$openrndrVersion" compile "org.openrndr:openrndr-filter:$openrndrVersion" compile "org.openrndr:openrndr-shape:$openrndrVersion" - compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.3.0-RC' + compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.3.0-RC2' + + testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spekVersion" + testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion" + testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:$spekVersion" + testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" } contacts { @@ -96,4 +110,9 @@ allprojects { } } + test { + useJUnitPlatform { + includeEngines 'spek2' + } + } } \ No newline at end of file diff --git a/orx-noise/src/test/kotlin/TestMathUtils.kt b/orx-noise/src/test/kotlin/TestMathUtils.kt new file mode 100644 index 00000000..d98c8761 --- /dev/null +++ b/orx-noise/src/test/kotlin/TestMathUtils.kt @@ -0,0 +1,12 @@ +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({ + describe("Fast floor") { + it("it is corrrect for 0.0") { + assertEquals(0, 0.0.fastFloor()) + } + } +}) \ No newline at end of file