Files
openide/java/java-tests/testSrc/com/intellij/psi/autodetect/JavaAutoDetectIndentTest.java
T
Yaroslav Lepenkin 53e202091f Made failing test passing.
Changed detected indent size to 4, which is default (It means we detected nothing, which is not bad)
Correct indent (2) is not detected because we determine continuation indent by last bracket in text, and this bracket could also be inside string literal, which is the case here.
2015-04-10 19:47:01 +03:00

51 lines
1.4 KiB
Java

/*
* Copyright 2000-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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.autodetect;
import com.intellij.JavaTestUtil;
import org.jetbrains.annotations.NotNull;
public class JavaAutoDetectIndentTest extends AbstractIndentAutoDetectionTest {
@NotNull
@Override
protected String getFileNameWithExtension() {
return getTestName(true) + ".java";
}
@NotNull
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() +
"/psi/autodetect/";
}
public void testNotIndentedComment() {
doTestIndentSize(3);
}
public void testContinuationIndents_DoNotCount() {
doTestIndentSize(4);
//actual indent is 2, and 4 is the default value
//todo: do not count brackets in string literals
}
public void testContinuationIndents_InMethodParameters_DoNotCount() {
doTestIndentSize(4);
}
}