[Test] Don't compare descriptors dump if there is no expected .txt file
Descriptors dump has not much sense, because at this point diagnostic tests for FE 1.0 mostly used only to compare diagnostics with FIR
This commit is contained in:
committed by
Space Team
parent
8ccd7c7d12
commit
de84cb8038
+6
-1
@@ -32,6 +32,11 @@ import org.jetbrains.kotlin.utils.keysToMap
|
||||
import java.util.function.Predicate
|
||||
import java.util.regex.Pattern
|
||||
|
||||
/**
|
||||
* Compares dump of descriptors if with expected
|
||||
* Dump lays in file testName.txt
|
||||
* If there is no .txt file than handler does nothing
|
||||
*/
|
||||
class DeclarationsDumpHandler(
|
||||
testServices: TestServices
|
||||
) : ClassicFrontendAnalysisHandler(testServices) {
|
||||
@@ -62,10 +67,10 @@ class DeclarationsDumpHandler(
|
||||
}
|
||||
val expectedFileName = "${testDataFile.nameWithoutExtension}$prefix.txt"
|
||||
val expectedFile = testDataFile.parentFile.resolve(expectedFileName)
|
||||
if (!expectedFile.exists()) return
|
||||
assertions.assertEqualsToFile(expectedFile, resultDump)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
override fun processModule(module: TestModule, info: ClassicFrontendOutputArtifact) {
|
||||
if (DiagnosticsDirectives.SKIP_TXT in module.directives) return
|
||||
val moduleDescriptor = info.analysisResult.moduleDescriptor
|
||||
|
||||
Reference in New Issue
Block a user