From 45b46296f929753eed8eee4ddcb8067f3b93f176 Mon Sep 17 00:00:00 2001 From: Piotr Adamczyk Date: Tue, 30 Jun 2020 17:56:21 +0200 Subject: [PATCH] #829 PR fixes --- .../main/kotlin/ftl/util/SavedMatrixTableUtil.kt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/test_runner/src/main/kotlin/ftl/util/SavedMatrixTableUtil.kt b/test_runner/src/main/kotlin/ftl/util/SavedMatrixTableUtil.kt index 910a5601c1..19c461e8c9 100644 --- a/test_runner/src/main/kotlin/ftl/util/SavedMatrixTableUtil.kt +++ b/test_runner/src/main/kotlin/ftl/util/SavedMatrixTableUtil.kt @@ -13,14 +13,11 @@ fun List.asPrintableTable(): String = buildTable( TableColumn(OUTCOME_DETAILS_COLUMN_HEADER, mapNotNull { it.outcomeDetails }) ) -private fun getOutcomeColor(outcome: String): SystemOutColor { - // inconclusive is treated as a failure, flaky as a success - return when (outcome) { - failure -> SystemOutColor.RED - success -> SystemOutColor.GREEN - flaky -> SystemOutColor.BLUE - else -> SystemOutColor.DEFAULT - } +private fun getOutcomeColor(outcome: String) = when (outcome) { + failure -> SystemOutColor.RED + success -> SystemOutColor.GREEN + flaky -> SystemOutColor.BLUE + else -> SystemOutColor.DEFAULT } private const val OUTCOME_COLUMN_HEADER = "OUTCOME"