Migrate compiler, idea and others to new case conversion api
This commit is contained in:
@@ -41,7 +41,7 @@ object TestsJsonMapGenerator {
|
||||
SECONDARY;
|
||||
|
||||
override fun toString(): String {
|
||||
return name.toLowerCase()
|
||||
return name.lowercase()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ object TestsStatisticCollector {
|
||||
val statistic = mutableMapOf<TestArea, SpecTestsStatElement>()
|
||||
|
||||
for (specTestArea in TestArea.values()) {
|
||||
val specTestsPath = "$SPEC_TESTDATA_PATH/${specTestArea.name.toLowerCase().replace("_", "/")}/${testLinkedType.testDataPath}"
|
||||
val specTestsPath = "$SPEC_TESTDATA_PATH/${specTestArea.name.lowercase().replace("_", "/")}/${testLinkedType.testDataPath}"
|
||||
|
||||
statistic[specTestArea] =
|
||||
SpecTestsStatElement(SpecTestsStatElementType.AREA)
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.regex.Pattern
|
||||
object CommonParser {
|
||||
fun String.withUnderscores() = replace(" ", "_")
|
||||
.replace(File.separator, "_")
|
||||
.toUpperCase()
|
||||
.uppercase()
|
||||
|
||||
fun String.splitByComma() = split(Regex(""",\s*"""))
|
||||
fun String.splitByPathSeparator() = split(File.separator)
|
||||
|
||||
@@ -85,8 +85,8 @@ private fun parseImplementationTestInfo(testFilePath: String, linkedTestType: Sp
|
||||
testArea = TestArea.valueOf(testInfoByContentMatcher.group("testArea").withUnderscores()),
|
||||
testType = TestType.valueOf(testInfoByContentMatcher.group("testType")),
|
||||
testNumber = testInfoElements[CommonSpecTestFileInfoElementType.NUMBER]?.content?.toInt() ?: 0,
|
||||
testDescription = fileNameWithoutExtension.toUpperCase()[0] + fileNameWithoutExtension.substring(1)
|
||||
.replace(Regex("""([A-Z])"""), " $1").toLowerCase(),
|
||||
testDescription = fileNameWithoutExtension.uppercase()[0] + fileNameWithoutExtension.substring(1)
|
||||
.replace(Regex("""([A-Z])"""), " $1").lowercase(),
|
||||
testInfoElements = testInfoElements,
|
||||
testCasesSet = SpecTestCasesSet(mutableMapOf(), mutableMapOf(), mutableMapOf()), //todo
|
||||
unexpectedBehavior = testInfoElements.contains(CommonInfoElementType.UNEXPECTED_BEHAVIOUR),
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ object HtmlSpecSentencesMapBuilder {
|
||||
spec.select("$SECTION_SELECTORS, $PARAGRAPH_SELECTORS, .sentence").forEach { element ->
|
||||
when {
|
||||
element.`is`(SECTION_SELECTORS) -> {
|
||||
val sectionTag = SectionTag.valueOf(element.tagName().toLowerCase())
|
||||
val sectionTag = SectionTag.valueOf(element.tagName().lowercase())
|
||||
while (!currentSectionsPath.empty() && currentSectionsPath.peek().first.level >= sectionTag.level) {
|
||||
currentSectionsPath.pop()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user