From 80802bf19846ff2a6b49304dce44cbd7816f4f11 Mon Sep 17 00:00:00 2001 From: Arrgentum Date: Wed, 15 Jun 2022 14:45:51 +0300 Subject: [PATCH] add check closed quoter ### Whats added: * corrected the logic of checking MultilionString * added fix test in IndentationRuleFixTest.kt - MultilionStringExpected.kt, MultilionStringTest.kt * delete smoke tests * run diktat:fix@diktat ### Issue (#811) --- .../diktat/ruleset/smoke/DiktatSmokeTest.kt | 6 ---- .../main/kotlin/MultilionStringExpected.kt | 11 -------- .../src/main/kotlin/MultilionStringTest.kt | 28 ------------------- 3 files changed, 45 deletions(-) delete mode 100644 diktat-rules/src/test/resources/test/smoke/src/main/kotlin/MultilionStringExpected.kt delete mode 100644 diktat-rules/src/test/resources/test/smoke/src/main/kotlin/MultilionStringTest.kt diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt index 37fe8a964e..7e958b0966 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt @@ -40,7 +40,6 @@ import java.time.LocalDate import kotlin.io.path.ExperimentalPathApi import kotlin.io.path.createTempFile import kotlinx.serialization.builtins.ListSerializer -import kotlinx.serialization.encodeToString typealias RuleToConfig = Map> @@ -294,11 +293,6 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", } } - @Test - fun `multilion string`() { - fixAndCompareSmokeTest("MultilionStringExpected.kt", "MultilionStringTest.kt") - } - companion object { private const val DEFAULT_CONFIG_PATH = "../diktat-analysis.yml" private val unfixedLintErrors: MutableList = mutableListOf() diff --git a/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/MultilionStringExpected.kt b/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/MultilionStringExpected.kt deleted file mode 100644 index 0ba3c8d590..0000000000 --- a/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/MultilionStringExpected.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.cqfn.diktat - -fun checkScript() { - lintMethod( - """ - |val q = 1 - | - """.trimMargin(), - fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" - ) -} diff --git a/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/MultilionStringTest.kt b/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/MultilionStringTest.kt deleted file mode 100644 index 7ba578c097..0000000000 --- a/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/MultilionStringTest.kt +++ /dev/null @@ -1,28 +0,0 @@ -package org.cqfn.diktat - -fun checkScript() { - lintMethod( - """ - |val A = "aa" - """.trimMargin(), - ) -} - -fun checkScript() { - lintMethod( - """ - |val q = 1 - | - """.trimMargin(), - fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" - ) -} - -fun `check dummy property`() { - lintMethod( - """ - |// provide your check here - """.trimMargin(), - LintError(1, 1, ruleId, "${DUMMY_TEST_WARNING.warnText()} some detailed explanation", true) - ) -}