Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
67ac90ce0868ee0c9cd08d72460f16efecded549
/
.
/
compiler
/
testData
/
codegen
/
box
/
cycles
/
cycle.kt
blob: 94b9c144713880d0d31f68cf94442b65d2a844b0 [
file
]
// WITH_STDLIB
import
kotlin
.
test
.*
fun cycle
(
cnt
:
Int
):
Int
{
var
sum
=
1
while
(
sum
==
cnt
)
{
sum
=
sum
+
1
}
return
sum
}
fun box
():
String
{
assertEquals
(
2
,
cycle
(
1
))
assertEquals
(
1
,
cycle
(
0
))
return
"OK"
}