forked from kscience/kmath
Improve tests
This commit is contained in:
parent
ff930532e0
commit
57328a176e
@ -3,11 +3,17 @@ package kscience.kmath.gsl
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
internal class GslMatrixTest {
|
||||
internal class GslMatrixRealTest {
|
||||
@Test
|
||||
fun dimensions() = GslRealMatrixContext {
|
||||
val mat = produce(42, 24) { _, _ -> 0.0 }
|
||||
assertEquals(42, mat.rowNum)
|
||||
assertEquals(24, mat.colNum)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun get() = GslRealMatrixContext {
|
||||
val mat = produce(1, 1) { _, _ -> 42.0 }
|
||||
assertEquals(42.0, mat[0, 0])
|
||||
}
|
||||
}
|
@ -12,7 +12,7 @@ import kotlin.test.assertEquals
|
||||
import kotlin.test.assertTrue
|
||||
import kotlin.time.measureTime
|
||||
|
||||
internal class RealTest {
|
||||
internal class GslRealContextTest {
|
||||
@Test
|
||||
fun testScale() = GslRealMatrixContext {
|
||||
val ma = produce(10, 10) { _, _ -> 0.1 }
|
Loading…
Reference in New Issue
Block a user