[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
-30
@@ -1,30 +0,0 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ symbol: KtClassifierSymbol): kotlin.Unit
|
||||
|
||||
public sealed class KtClassLikeSymbol : KtClassifierSymbol {
|
||||
protected constructor KtClassLikeSymbol()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public sealed class KtClassifierSymbol {
|
||||
protected constructor KtClassifierSymbol()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface KtNamedSymbol {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class KtTypeParameterSymbol : KtClassifierSymbol {
|
||||
public constructor KtTypeParameterSymbol()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+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