-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Whats added: * corrected the logic of checking MultilionString * added fix test in IndentationRuleFixTest.kt - MultilionStringExpected.kt, MultilionStringTest.kt * run diktat:fix@diktat ### Issue (#811)
- Loading branch information
Arrgentum
committed
Jun 15, 2022
1 parent
1ae4cff
commit 86b838b
Showing
3 changed files
with
94 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 39 additions & 8 deletions
47
diktat-rules/src/test/resources/test/paragraph3/indentation/MultilionStringExpected.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,46 @@ | ||
package test.paragraph3.indentation | ||
|
||
fun checkScript() { | ||
//test of correct opening quotation mark and incorrect closing quotation mark | ||
fun multilionString() { | ||
lintMethod( | ||
""" | ||
|val q = 1 | ||
| | ||
""".trimMargin(), | ||
fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" | ||
""" | ||
|val q = 1 | ||
| | ||
""".trimMargin(), | ||
fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" | ||
) | ||
} | ||
|
||
fun lintMethod(trimMargin: String, fileName: String) { | ||
TODO("Not yet implemented") | ||
//test of incorrect opening quotation mark and incorrect closing quotation mark1 | ||
fun multilionString() { | ||
lintMethod( | ||
""" | ||
|val q = 1 | ||
| | ||
""".trimMargin(), | ||
fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" | ||
) | ||
} | ||
|
||
//test of incorrect opening quotation mark and incorrect closing quotation mark2 | ||
fun multilionString() { | ||
lintMethod( | ||
""" | ||
|val q = 1 | ||
| | ||
""".trimMargin(), | ||
fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" | ||
) | ||
} | ||
|
||
//test of incorrect opening quotation mark and incorrect closing quotation mark with incorrect shift | ||
fun multilionString() { | ||
lintMethod( | ||
""" | ||
|val q = 1 | ||
| | ||
""".trimMargin(), | ||
fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" | ||
) | ||
} | ||
|
43 changes: 38 additions & 5 deletions
43
diktat-rules/src/test/resources/test/paragraph3/indentation/MultilionStringTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,46 @@ | ||
package test.paragraph3.indentation | ||
|
||
fun checkScript() { | ||
//test of correct opening quotation mark and incorrect closing quotation mark | ||
fun multilionString() { | ||
lintMethod( | ||
""" | ||
|val q = 1 | ||
| | ||
""".trimMargin(), | ||
fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" | ||
) | ||
} | ||
|
||
//test of incorrect opening quotation mark and incorrect closing quotation mark1 | ||
fun multilionString() { | ||
lintMethod( | ||
""" | ||
|val q = 1 | ||
| | ||
""".trimMargin(), | ||
fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" | ||
) | ||
} | ||
|
||
//test of incorrect opening quotation mark and incorrect closing quotation mark2 | ||
fun multilionString() { | ||
lintMethod( | ||
""" | ||
|val A = "ASD" | ||
""".trimMargin(), | ||
|val q = 1 | ||
| | ||
""".trimMargin(), | ||
fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" | ||
) | ||
} | ||
|
||
fun lintMethod(trimMargin: String, fileName: String) { | ||
TODO("Not yet implemented") | ||
//test of incorrect opening quotation mark and incorrect closing quotation mark with incorrect shift | ||
fun multilionString() { | ||
lintMethod( | ||
""" | ||
|val q = 1 | ||
| | ||
""".trimMargin(), | ||
fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" | ||
) | ||
} | ||
|