IJ-CR-135039 Replace usages of PlatformTestUtil.newPerformanceTest with PerformanceTestUtil.newPerformanceTest

GitOrigin-RevId: 4edcfadc23f7305d68b8c08cd6ae634ee4869a2e
This commit is contained in:
Maxim.Kolmakov
2024-05-31 19:28:45 +02:00
committed by intellij-monorepo-bot
parent 79ffafd27a
commit 71168cb8a9
125 changed files with 414 additions and 376 deletions

View File

@@ -5,7 +5,7 @@ import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiModifier;
import com.intellij.psi.impl.source.PsiJavaFileImpl;
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
import com.intellij.testFramework.PlatformTestUtil;
import com.intellij.tools.ide.metrics.benchmark.PerformanceTestUtil;
import de.plushnikov.intellij.plugin.AbstractLombokLightCodeInsightTestCase;
public class PerformanceTest extends AbstractLombokLightCodeInsightTestCase {
@@ -14,7 +14,7 @@ public class PerformanceTest extends AbstractLombokLightCodeInsightTestCase {
final String testName = getTestName(true);
loadToPsiFile("/performance/" + testName + "/lombok.config");
final PsiFile psiFile = loadToPsiFile("/performance/" + testName + "/HugeClass.java");
PlatformTestUtil.newPerformanceTest(getTestName(false), () -> {
PerformanceTestUtil.newPerformanceTest(getTestName(false), () -> {
type(' ');
PsiDocumentManager.getInstance(getProject()).commitDocument(getEditor().getDocument());
((PsiJavaFileImpl)psiFile).getClasses()[0].getFields()[0].hasModifierProperty(PsiModifier.FINAL);
@@ -34,7 +34,7 @@ public class PerformanceTest extends AbstractLombokLightCodeInsightTestCase {
}
public void testGeneratedCode() {
PlatformTestUtil.newPerformanceTest("300 unrelated methods", () -> {
PerformanceTestUtil.newPerformanceTest("300 unrelated methods", () -> {
StringBuilder text = new StringBuilder("import lombok.Getter; import lombok.Setter; @interface Tolerate{} class Foo {");
for (int i = 0; i < 200; i++) {
text.append("@Getter @Setter int bar").append(i).append(";");
@@ -57,7 +57,7 @@ public class PerformanceTest extends AbstractLombokLightCodeInsightTestCase {
}
public void testGeneratedCodeThroughStubs() {
PlatformTestUtil.newPerformanceTest("200 unrelated methods", () -> {
PerformanceTestUtil.newPerformanceTest("200 unrelated methods", () -> {
StringBuilder text = new StringBuilder("import lombok.Getter; import lombok.Setter; @interface Tolerate{} class Foo {");
for (int i = 0; i < 200; i++) {
text.append("@Getter @Setter int bar").append(i).append(";");
@@ -101,7 +101,7 @@ public class PerformanceTest extends AbstractLombokLightCodeInsightTestCase {
classText.append("}");
}
PlatformTestUtil.newPerformanceTest("@Data/@EqualsAndHashCode/@ToString performance", () -> {
PerformanceTestUtil.newPerformanceTest("@Data/@EqualsAndHashCode/@ToString performance", () -> {
myFixture.configureByText("Bar.java", classText.toString());
myFixture.checkHighlighting();
})