mirror of
https://github.com/irmen/prog8.git
synced 2024-11-08 14:07:32 +00:00
51 lines
1.4 KiB
Kotlin
51 lines
1.4 KiB
Kotlin
package prog8tests
|
|
|
|
import io.kotest.core.config.AbstractProjectConfig
|
|
|
|
object ProjectConfig : AbstractProjectConfig() {
|
|
override val parallelism = kotlin.math.max(1, Runtime.getRuntime().availableProcessors() / 2)
|
|
// override fun listeners() = listOf(SystemOutToNullListener)
|
|
}
|
|
|
|
//object SystemOutToNullListener: TestListener {
|
|
// override suspend fun beforeSpec(spec: Spec) = setup()
|
|
//
|
|
// private fun setup() {
|
|
// System.setOut(object: PrintStream(object: ByteArrayOutputStream(){
|
|
// override fun write(p0: Int) {
|
|
// // do nothing
|
|
// }
|
|
//
|
|
// override fun write(b: ByteArray, off: Int, len: Int) {
|
|
// // do nothing
|
|
// }
|
|
//
|
|
// override fun write(b: ByteArray) {
|
|
// // do nothing
|
|
// }
|
|
// }){}
|
|
// )
|
|
// }
|
|
//}
|
|
//
|
|
//object SystemErrToNullListener: TestListener {
|
|
// override suspend fun beforeSpec(spec: Spec) = setup()
|
|
//
|
|
// private fun setup() {
|
|
// System.setErr(object: PrintStream(object: ByteArrayOutputStream(){
|
|
// override fun write(p0: Int) {
|
|
// // do nothing
|
|
// }
|
|
//
|
|
// override fun write(b: ByteArray, off: Int, len: Int) {
|
|
// // do nothing
|
|
// }
|
|
//
|
|
// override fun write(b: ByteArray) {
|
|
// // do nothing
|
|
// }
|
|
// }){}
|
|
// )
|
|
// }
|
|
//}
|