Fix unit tests for orx-gradient-descent
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import org.amshove.kluent.`should be equal to`
|
||||
import org.openrndr.extra.gradientdescent.dot
|
||||
import org.spekframework.spek2.Spek
|
||||
import org.spekframework.spek2.style.specification.describe
|
||||
|
||||
@@ -13,18 +14,15 @@ object TestDot : Spek({
|
||||
describe("a matrix and a vector") {
|
||||
val a = arrayOf(doubleArrayOf(10.0))
|
||||
val b = doubleArrayOf(1.0)
|
||||
|
||||
val d = dot(a,b)
|
||||
d[0] `should be equal to` 10.0
|
||||
|
||||
}
|
||||
|
||||
describe("a matrix and a vector") {
|
||||
val a = arrayOf(doubleArrayOf(1.0))
|
||||
val b = doubleArrayOf(19.99999999995339)
|
||||
|
||||
val d = dot(a,b)
|
||||
d[0] `should be equal to` 19.99999999995339
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user