[K/N][Tests] Adjust moved codegen tests to new infra
^KT-61259
This commit is contained in:
committed by
Space Team
parent
71a834b778
commit
73032213f0
+5
-5
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.cycles.cycle
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun cycle(cnt: Int): Int {
|
||||
@@ -15,7 +13,9 @@ fun cycle(cnt: Int): Int {
|
||||
return sum
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
if (cycle(1) != 2) throw Error()
|
||||
if (cycle(0) != 1) throw Error()
|
||||
fun box(): String {
|
||||
assertEquals(2, cycle(1))
|
||||
assertEquals(1, cycle(0))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
+5
-5
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.cycles.cycle_do
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun cycle_do(cnt: Int): Int {
|
||||
@@ -15,7 +13,9 @@ fun cycle_do(cnt: Int): Int {
|
||||
return sum
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
if (cycle_do(3) != 5) throw Error()
|
||||
if (cycle_do(0) != 3) throw Error()
|
||||
fun box(): String {
|
||||
assertEquals(5, cycle_do(3))
|
||||
assertEquals(3, cycle_do(0))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package codegen.cycles.cycle_for
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun cycle_for(arr: Array<Int>) : Int {
|
||||
@@ -15,6 +13,8 @@ fun cycle_for(arr: Array<Int>) : Int {
|
||||
return sum
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
if (cycle_for(Array(4, init = { it })) != 6) throw Error()
|
||||
fun box(): String {
|
||||
assertEquals(6, cycle_for(Array(4, init = { it })))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user