All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.kotest.engine.spec.ordering.kt Maven / Gradle / Ivy

package io.kotest.engine.spec

import io.kotest.core.spec.SpecExecutionOrder
import io.kotest.core.spec.Spec
import kotlin.reflect.KClass

fun List>.sort(order: SpecExecutionOrder): List> {
   return when (order) {
      SpecExecutionOrder.Undefined -> this
      SpecExecutionOrder.Lexicographic -> LexicographicSpecSorter.sort(this)
      SpecExecutionOrder.Random -> RandomSpecSorter.sort(this)
      SpecExecutionOrder.Annotated -> AnnotatedSpecSorter.sort(this)
      SpecExecutionOrder.FailureFirst -> failureFirstSort(this)
   }
}

expect fun failureFirstSort(classes: List>): List>





© 2015 - 2025 Weber Informatics LLC | Privacy Policy