From 252771decd03fa548c7174988c6ae250a65cba29 Mon Sep 17 00:00:00 2001 From: Piotr Adamczyk Date: Wed, 24 Jun 2020 15:22:37 +0200 Subject: [PATCH] #829 fix OutcomeDetailsFormatter.kt --- .../main/kotlin/ftl/util/OutcomeDetailsFormatter.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_runner/src/main/kotlin/ftl/util/OutcomeDetailsFormatter.kt b/test_runner/src/main/kotlin/ftl/util/OutcomeDetailsFormatter.kt index 6f9939cc1a..d5c47d855a 100644 --- a/test_runner/src/main/kotlin/ftl/util/OutcomeDetailsFormatter.kt +++ b/test_runner/src/main/kotlin/ftl/util/OutcomeDetailsFormatter.kt @@ -37,9 +37,9 @@ private val TestSuiteOverviewData.successCount private fun FailureDetail?.getFailureOutcomeDetails(testSuiteOverviewData: TestSuiteOverviewData?) = when { this == null -> testSuiteOverviewData?.buildFailureOutcomeDetailsSummary() - crashed -> "Application crashed" - timedOut -> "Test timed out" - notInstalled -> "App failed to install" + crashed == true -> "Application crashed" + timedOut == true -> "Test timed out" + notInstalled == true -> "App failed to install" else -> testSuiteOverviewData?.buildFailureOutcomeDetailsSummary() } + this?.takeIf { it.otherNativeCrash }?.let { NATIVE_CRASH_MESSAGE }.orEmpty() @@ -54,8 +54,8 @@ private fun TestSuiteOverviewData.buildFailureOutcomeDetailsSummary(): String { private fun InconclusiveDetail?.formatOutcomeDetails() = when { this == null -> "Unknown reason" - infrastructureFailure -> "Infrastructure failure" - abortedByUser -> "Test run aborted by user" + infrastructureFailure == true -> "Infrastructure failure" + abortedByUser == true -> "Test run aborted by user" else -> "Unknown reason" }