EA-36715 (better detect doc comment before conversion)

This commit is contained in:
Roman Shevchenko
2012-06-18 17:04:18 +02:00
parent 72ecc025e2
commit 062710d3a6
4 changed files with 59 additions and 27 deletions
@@ -0,0 +1,23 @@
/*
* Copyright 2000-2012 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.
*/
class C {
/**
* Some method.
*
* @param value some (©)<caret> param.
*/
abstract void m(int value);
}
@@ -0,0 +1,23 @@
/*
* Copyright 2000-2012 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.
*/
class C {
/**
* Some method.
*
* @param value some (&copy;) param.
*/
abstract void m(int value);
}
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.codeInsight.intention;
import com.intellij.JavaTestUtil;
@@ -22,7 +21,6 @@ import com.intellij.openapi.vfs.encoding.EncodingManager;
import com.intellij.testFramework.fixtures.CodeInsightTestUtil;
import com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase;
public class ConvertToBasicLatinTest extends JavaCodeInsightFixtureTestCase {
private String myIntention;
@@ -33,24 +31,19 @@ public class ConvertToBasicLatinTest extends JavaCodeInsightFixtureTestCase {
EncodingManager.getInstance().setDefaultCharsetName("UTF-8");
}
public void testConvertCharLiteral() throws Exception {
CodeInsightTestUtil.doIntentionTest(myFixture, myIntention, "CharLiteral.java", "CharLiteral_after.java");
}
public void testConvertStringLiteral() throws Exception {
CodeInsightTestUtil.doIntentionTest(myFixture, myIntention, "StringLiteral.java", "StringLiteral_after.java");
}
public void testConvertPlainComment() throws Exception {
CodeInsightTestUtil.doIntentionTest(myFixture, myIntention, "PlainComment.java", "PlainComment_after.java");
}
public void testConvertDocComment() throws Exception {
CodeInsightTestUtil.doIntentionTest(myFixture, myIntention, "DocComment.java", "DocComment_after.java");
}
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() + "/codeInsight/convertToBasicLatin/";
}
public void testCharLiteral() { doTest(); }
public void testStringLiteral() { doTest(); }
public void testPlainComment() { doTest(); }
public void testDocComment() { doTest(); }
public void testDocTag() { doTest(); }
private void doTest() {
final String name = getTestName(false);
CodeInsightTestUtil.doIntentionTest(myFixture, myIntention, name + ".java", name + "_after.java");
}
}