Analysis API: add test for KtDiagnosticsProvider
This commit is contained in:
committed by
TeamCityServer
parent
cd3827ca2e
commit
f197fc93db
+11
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.descriptors.test.components.diagnosticsProvider
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.descriptors.test.KtFe10FrontendApiTestConfiguratorService
|
||||
import org.jetbrains.kotlin.analysis.api.impl.base.test.components.diagnosticProvider.AbstractCollectDiagnosticsTest
|
||||
|
||||
abstract class AbstractKtFe10CollectDiagnosticsTest : AbstractCollectDiagnosticsTest(KtFe10FrontendApiTestConfiguratorService)
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api.descriptors.test.components.diagnosticsProvider;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class KtFe10CollectDiagnosticsTestGenerated extends AbstractKtFe10CollectDiagnosticsTest {
|
||||
@Test
|
||||
public void testAllFilesPresentInDiagnostics() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("declarationErrors.kt")
|
||||
public void testDeclarationErrors() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/declarationErrors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("resolutionErrors.kt")
|
||||
public void testResolutionErrors() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/resolutionErrors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeMismatches.kt")
|
||||
public void testTypeMismatches() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/typeMismatches.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolved.kt")
|
||||
public void testUnresolved() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/unresolved.kt");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user