diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/performance/redundant_string_format_call/RedundantStringFormatCall.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/performance/redundant_string_format_call/RedundantStringFormatCall.java
index 9591444bc4c6..a3077ede82a9 100644
--- a/plugins/InspectionGadgets/test/com/siyeh/igtest/performance/redundant_string_format_call/RedundantStringFormatCall.java
+++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/performance/redundant_string_format_call/RedundantStringFormatCall.java
@@ -7,14 +7,14 @@ import static java.lang.String.format;
public class RedundantStringFormatCall {
public static final String A = String.format("%n");
- String b = String.format("no parameters");
- String c = String.format("asdf%n" +
- "asdf%n");
- String d = String.format("asdf" + "asdf" + "asdf%n");
- String e = format("test");
+ String b = String.format("no parameters");
+ String c = String.format("asdf%n" +
+ "asdf%n");
+ String d = String.format("asdf" + "asdf" + "asdf%n");
+ String e = format("test");
- void m() {
- System.out.println(String.format("string contains %%n%n")); // ok
- System.out.println(String.format(Locale.ENGLISH, "string contains %%n%n"));
- }
+ void m() {
+ System.out.println(String.format("string contains %%n%n")); // ok
+ System.out.println(String.format(Locale.ENGLISH, "string contains %%n%n"));
+ }
}
\ No newline at end of file
diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/performance/redundant_string_format_call/expected.xml b/plugins/InspectionGadgets/test/com/siyeh/igtest/performance/redundant_string_format_call/expected.xml
deleted file mode 100644
index 6ed624731209..000000000000
--- a/plugins/InspectionGadgets/test/com/siyeh/igtest/performance/redundant_string_format_call/expected.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- RedundantStringFormatCall.java
- 10
- Redundant call to 'String.format()'
- Redundant call to <code>format</code> #loc
-
-
-
- RedundantStringFormatCall.java
- 14
- Redundant call to 'String.format()'
- Redundant call to <code>format</code> #loc
-
-
\ No newline at end of file
diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/performance/RedundantStringFormatCallInspectionTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/performance/RedundantStringFormatCallInspectionTest.java
index 2f0f59709ba1..be178133d7ae 100644
--- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/performance/RedundantStringFormatCallInspectionTest.java
+++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/performance/RedundantStringFormatCallInspectionTest.java
@@ -1,12 +1,36 @@
+/*
+ * Copyright 2000-2017 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.siyeh.ig.performance;
-import com.siyeh.ig.IGInspectionTestCase;
+import com.intellij.codeInspection.InspectionProfileEntry;
+import com.siyeh.ig.LightInspectionTestCase;
+import org.jetbrains.annotations.Nullable;
-public class RedundantStringFormatCallInspectionTest
- extends IGInspectionTestCase {
+/**
+ * @author Bas Leijdekkers
+ */
+public class RedundantStringFormatCallInspectionTest extends LightInspectionTestCase {
- public void test() throws Exception {
- doTest("com/siyeh/igtest/performance/redundant_string_format_call",
- new RedundantStringFormatCallInspection());
+ public void testRedundantStringFormatCall() {
+ doTest();
+ }
+
+ @Nullable
+ @Override
+ protected InspectionProfileEntry getInspection() {
+ return new RedundantStringFormatCallInspection();
}
}
\ No newline at end of file