0df71bd696
- 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
14 lines
296 B
Kotlin
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"
|
|
}
|