Add test for grid iteration.
This commit is contained in:
parent
ae5ca44dc0
commit
f7e792faff
@ -15,4 +15,13 @@ class GridTest {
|
|||||||
assertEquals(6, grid.size)
|
assertEquals(6, grid.size)
|
||||||
assertTrue { (grid - DoubleVector(0.0, 0.2, 0.4, 0.6, 0.8, 1.0)).norm < 1e-4 }
|
assertTrue { (grid - DoubleVector(0.0, 0.2, 0.4, 0.6, 0.8, 1.0)).norm < 1e-4 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testIterateGrid(){
|
||||||
|
var res = 0.0
|
||||||
|
for(d in 0.0..1.0 step 0.2){
|
||||||
|
res = d
|
||||||
|
}
|
||||||
|
assertEquals(1.0, res)
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user