Files
kotlin-fork/compiler/testData/codegen/controlStructures/ifInWhile.kt
T
Alexander Udalov 0df71bd696 Refactor codegen tests
- initialize environment only once in setUp()
- add comments on why some tests are disabled
- modify and rename some tests
- re-enable now working tests
- extract some tests into files with box()
- remove useless 'throws' declarations and commented code
2013-01-24 21:12:27 +04:00

14 lines
296 B
Kotlin

import java.lang.Runtime
fun box() : String {
val processors = Runtime.getRuntime()!!.availableProcessors()
var threadNum = 1
while(threadNum <= 1024) {
if(threadNum < 2 * processors)
threadNum += 1
else
threadNum *= 2
}
return "OK"
}