Rewrite tests for formatting during typing with auto generator

This commit is contained in:
Nikolay Krasko
2014-04-22 17:10:57 +04:00
parent 13dce4dd11
commit c42908eff7
30 changed files with 272 additions and 215 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -105,6 +105,7 @@ import org.jetbrains.jet.plugin.codeInsight.AbstractJetInspectionTest
import org.jetbrains.jet.plugin.debugger.AbstractKotlinSteppingTest
import org.jetbrains.jet.completion.AbstractMultiFileJvmBasicCompletionTest
import org.jetbrains.jet.plugin.refactoring.introduce.introduceVariable.AbstractJetExtractionTest
import org.jetbrains.jet.formatter.AbstractJetTypingIndentationTestBase
import org.jetbrains.jet.plugin.debugger.evaluate.AbstractKotlinEvaluateExpressionTest
import org.jetbrains.jet.plugin.debugger.evaluate.AbstractSelectExpressionForDebuggerTest
import org.jetbrains.jet.plugin.debugger.evaluate.AbstractCodeFragmentCompletionTest
@@ -518,6 +519,13 @@ fun main(args: Array<String>) {
testMethod = "doTestInverted", testClassName = "FormatterInverted")
}
testClass(javaClass<AbstractJetTypingIndentationTestBase>()) {
model("indentationOnNewline", pattern = """^([^\.]+)\.after\.kt.*$""", testMethod = "doNewlineTest",
testClassName = "DirectSettings")
model("indentationOnNewline", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", testMethod = "doNewlineTestWithInvert",
testClassName = "InvertedSettings")
}
testClass(javaClass<AbstractDiagnosticMessageTest>()) {
model("diagnosticMessage")
}