Make mpp tests gutters aware of different platforms run
Behaviour is similar to the test suite gutters: - simple triangle when there is no history - triangle + red circle if some runs failed - triangle + green circle if all runs passed ^KMM-100 Fixed.
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.platform
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
inline fun <reified T : SimplePlatform> TargetPlatform.subplatformsOfType(): List<T> = componentPlatforms.filterIsInstance<T>()
|
||||
fun <T> TargetPlatform.subplatformsOfType(klass: Class<T>): List<T> = componentPlatforms.filterIsInstance(klass)
|
||||
|
||||
inline fun <reified T : SimplePlatform> TargetPlatform?.has(): Boolean = this != null && subplatformsOfType<T>().isNotEmpty()
|
||||
fun <T> TargetPlatform?.has(klass: Class<T>): Boolean = this != null && subplatformsOfType(klass).isNotEmpty()
|
||||
fun TargetPlatform?.has(klass: KClass<*>): Boolean = this != null && subplatformsOfType(klass.java).isNotEmpty()
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user