Skip to content

Commit 29a7c36

Browse files
authored
Odd file names in actual result (#568)
- added checking actual result
1 parent 751f8c5 commit 29a7c36

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • save-plugins/warn-plugin/src/commonMain/kotlin/com/saveourtool/save/plugin/warn/utils

save-plugins/warn-plugin/src/commonMain/kotlin/com/saveourtool/save/plugin/warn/utils/ResultsChecker.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.saveourtool.save.plugin.warn.utils
22

3+
import com.saveourtool.save.core.logging.logError
34
import com.saveourtool.save.core.result.CountWarnings
45
import com.saveourtool.save.core.result.Fail
56
import com.saveourtool.save.core.result.Pass
@@ -20,6 +21,13 @@ class ResultsChecker(
2021
private val actualWarningsMap: FileToWarningsMap,
2122
private val warnPluginConfig: WarnPluginConfig,
2223
) {
24+
init {
25+
val oddActualFileNames = actualWarningsMap.keys - expectedWarningsMap.keys
26+
if (oddActualFileNames.isNotEmpty()) {
27+
logError("Detected odd file names in actual result: $oddActualFileNames")
28+
}
29+
}
30+
2331
/**
2432
* Compares actual and expected warnings and returns TestResult
2533
*

0 commit comments

Comments
 (0)