- upgrade to gradle 5.3.1 - upgrade to junit 5 - update test for compatibility to junit 5
This commit is contained in:
parent
079723937d
commit
bb45e3ed9e
@ -2,6 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version Config.Versions.kotlin
|
||||
jacoco
|
||||
}
|
||||
|
||||
group = "norangebit"
|
||||
@ -21,8 +22,10 @@ dependencies {
|
||||
testImplementation(Config.Libs.junit)
|
||||
testImplementation(Config.Libs.kluent)
|
||||
testImplementation(Config.Libs.mockk)
|
||||
testImplementation (Config.Libs.jetbrainJunit)
|
||||
// testImplementation(Config.Libs.spekDsl)
|
||||
|
||||
testRuntimeOnly(Config.Libs.junitEngine)
|
||||
// testRuntimeOnly(Config.Libs.kotlinReflect)
|
||||
// testRuntimeOnly(Config.Libs.spekRunner)
|
||||
}
|
||||
@ -31,4 +34,8 @@ tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
tasks.register("ktlint", Ktlint::class)
|
||||
tasks.getByName<Test>("test") {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
tasks.register("ktlint", Ktlint::class)
|
||||
|
@ -28,10 +28,10 @@ object Config {
|
||||
val arrow = "0.8.2"
|
||||
val kluent = "1.48"
|
||||
val koin = "1.0.2"
|
||||
val junit = "5.1.0"
|
||||
val junit = "5.4.2"
|
||||
val spek = "2.0.1"
|
||||
val kotlin = "1.3.21"
|
||||
val mockk = "1.9.2"
|
||||
val kotlin = "1.3.30"
|
||||
val mockk = "1.9.3"
|
||||
val gson = "2.8.5"
|
||||
}
|
||||
|
||||
@ -39,11 +39,13 @@ object Config {
|
||||
val arrowCore = "io.arrow-kt:arrow-core:${Versions.arrow}"
|
||||
val koin = "org.koin:koin-core:${Versions.koin}"
|
||||
val junit = "org.junit.jupiter:junit-jupiter-api:${Versions.junit}"
|
||||
val junitEngine = "org.junit.jupiter:junit-jupiter-engine:${Versions.junit}"
|
||||
val kluent = "org.amshove.kluent:kluent:${Versions.kluent}"
|
||||
val spekDsl = "org.spekframework.spek2:spek-dsl-jvm:${Versions.spek}"
|
||||
val kotlinReflect = "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlin}"
|
||||
val spekRunner = "org.spekframework.spek2:spek-runner-junit5:${Versions.spek}"
|
||||
val mockk = "io.mockk:mockk:${Versions.mockk}"
|
||||
val gson = "com.google.code.gson:gson:${Versions.gson}"
|
||||
val jetbrainJunit = "org.jetbrains.kotlin:kotlin-test-junit:${Versions.kotlin}"
|
||||
}
|
||||
}
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -26,14 +26,14 @@
|
||||
package it.norangeb.algorithms.datastructures.bag
|
||||
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Before
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class LinkedListBagTest {
|
||||
private var bag = LinkedListBag<Int>()
|
||||
private lateinit var bag :LinkedListBag<Int>
|
||||
|
||||
@Before
|
||||
fun makeBag() {
|
||||
@BeforeEach
|
||||
fun init() {
|
||||
bag = LinkedListBag()
|
||||
}
|
||||
|
||||
|
@ -26,13 +26,13 @@
|
||||
package it.norangeb.algorithms.datastructures.bag
|
||||
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Before
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class ResizingArrayBagTest {
|
||||
private var bag = ResizingArrayBag<Int>()
|
||||
private lateinit var bag :ResizingArrayBag<Int>
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
fun makeBag() {
|
||||
bag = ResizingArrayBag()
|
||||
}
|
||||
|
@ -30,13 +30,13 @@ import arrow.core.Some
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.amshove.kluent.`should be`
|
||||
import org.amshove.kluent.should
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class MapTest {
|
||||
lateinit var map: Dictionary<String, Int>
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
fun init() {
|
||||
map = Map()
|
||||
}
|
||||
|
@ -29,13 +29,13 @@ import arrow.core.None
|
||||
import arrow.core.Some
|
||||
import arrow.core.getOrElse
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Before
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class LinkedListQueueTest {
|
||||
private var queue = LinkedListQueue<Int>()
|
||||
private lateinit var queue : LinkedListQueue<Int>
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
fun makeQueue() {
|
||||
queue = LinkedListQueue()
|
||||
}
|
||||
|
@ -29,13 +29,13 @@ import arrow.core.None
|
||||
import arrow.core.Some
|
||||
import arrow.core.getOrElse
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Before
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class ResizingArrayQueueTest {
|
||||
private var queue = ResizingArrayQueue<Int>()
|
||||
private lateinit var queue : ResizingArrayQueue<Int>
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
fun makeQueue() {
|
||||
queue = ResizingArrayQueue()
|
||||
}
|
||||
|
@ -28,14 +28,14 @@ package it.norangeb.algorithms.datastructures.stack
|
||||
import arrow.core.None
|
||||
import arrow.core.getOrElse
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Before
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class LinkedListStackTest {
|
||||
private var stack = LinkedListStack<Int>()
|
||||
private lateinit var stack : LinkedListStack<Int>
|
||||
|
||||
@Before
|
||||
fun makeStack() {
|
||||
@BeforeEach
|
||||
fun init() {
|
||||
stack = LinkedListStack()
|
||||
}
|
||||
|
||||
|
@ -26,13 +26,13 @@
|
||||
package it.norangeb.algorithms.datastructures.unionfind
|
||||
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Before
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class QuickFindTest {
|
||||
private var unionFind = QuickFind(10)
|
||||
private lateinit var unionFind : QuickFind
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
fun init() {
|
||||
unionFind = QuickFind(10)
|
||||
}
|
||||
|
@ -26,13 +26,13 @@
|
||||
package it.norangeb.algorithms.datastructures.unionfind
|
||||
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Before
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class QuickUnionCompressionPathTest {
|
||||
private var unionFind = QuickUnion(10)
|
||||
private lateinit var unionFind : QuickUnion
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
fun init() {
|
||||
unionFind = QuickUnion(10)
|
||||
}
|
||||
|
@ -26,13 +26,13 @@
|
||||
package it.norangeb.algorithms.datastructures.unionfind
|
||||
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Before
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class QuickUnionTest {
|
||||
private var unionFind = QuickUnion(10)
|
||||
private lateinit var unionFind : QuickUnion
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
fun init() {
|
||||
unionFind = QuickUnion(10)
|
||||
}
|
||||
|
@ -26,13 +26,13 @@
|
||||
package it.norangeb.algorithms.datastructures.unionfind
|
||||
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.junit.Before
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class QuickUnionWithSizeTest {
|
||||
private var unionFind = QuickUnionWithSize(10)
|
||||
private lateinit var unionFind : QuickUnionWithSize
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
fun init() {
|
||||
unionFind = QuickUnionWithSize(10)
|
||||
}
|
||||
|
@ -26,22 +26,16 @@
|
||||
package it.norangeb.algorithms.exercises
|
||||
|
||||
import org.amshove.kluent.`should equal`
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class OrderedListSorterTest {
|
||||
|
||||
lateinit var lists: List<List<Int>>
|
||||
|
||||
@Before
|
||||
fun init() {
|
||||
lists = listOf(
|
||||
val lists = listOf(
|
||||
listOf(1, 5, 9, 10, 12, 14, 15, 15, 20, 25, 29, 31, 35, 37, 43, 48),
|
||||
listOf(2, 7, 12, 21, 23, 33, 35, 43, 45),
|
||||
listOf(3, 7, 9, 12, 14, 16, 27, 28, 37, 39, 45, 45, 46, 50),
|
||||
listOf(1, 8, 9, 11, 13, 21, 25, 33, 34, 41, 47, 48)
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testSortUnsignedInt() {
|
||||
|
Loading…
Reference in New Issue
Block a user