diff --git a/platform/testFramework/bootstrap/src/com/intellij/tests/JUnit5TeamCityRunner.java b/platform/testFramework/bootstrap/src/com/intellij/tests/JUnit5TeamCityRunner.java index 770b568e6630..2a69f8185a3d 100644 --- a/platform/testFramework/bootstrap/src/com/intellij/tests/JUnit5TeamCityRunner.java +++ b/platform/testFramework/bootstrap/src/com/intellij/tests/JUnit5TeamCityRunner.java @@ -234,23 +234,10 @@ public final class JUnit5TeamCityRunner { } public static class TCLogRecordListener extends LogRecordListener { - private static final List KNOWN_EXCEPTIONAL_WARNINGS = List.of( // TODO: migrate these tests to JUnit 5 + private static final List KNOWN_EXCEPTIONAL_WARNINGS = List.of( "Discovered 2 'junit-platform.properties' configuration files on the classpath (see below); only the first (*) will be used.", // https://github.com/junit-team/junit-framework/issues/2794 "Discovered 3 'junit-platform.properties' configuration files on the classpath (see below); only the first (*) will be used.", - "Discovered 4 'junit-platform.properties' configuration files on the classpath (see below); only the first (*) will be used.", - "Runner org.jetbrains.plugins.ruby.ruby.runners.GemSuite (used on class ", - "Runner org.jetbrains.plugins.ruby.ruby.runners.IndexingModeSuite (used on ", - "Runner org.junit.internal.runners.SuiteMethod (used on class com.intellij.codeInsight.template.emmet.HtmlEmmetAbbreviationTest) was not able to satisfy all filter requests.", - "Runner org.junit.internal.runners.SuiteMethod (used on class com.intellij.codeInsight.template.emmet.XslEmmetAbbreviationTest) was not able to satisfy all filter requests.", - "Runner org.junit.internal.runners.SuiteMethod (used on class com.intellij.codeInsight.template.emmet.filters.BemEmmetFilterTest) was not able to satisfy all filter requests.", - "Runner org.junit.internal.runners.SuiteMethod (used on class css.emmet.CssPropertiesEmmetAbbreviationTest) was not able to satisfy all filter requests.", - "Runner org.junit.runners.Parameterized (used on class com.intellij.database.grid.DataGridInsertRowWithValueTest) was not able to satisfy all filter requests.", - "Runner org.junit.runners.Parameterized (used on class com.intellij.lang.ruby.rbs.psi.data.RbsTypeSignatureSubtypeCheckerTest) was not able to satisfy all filter requests.", - "Runner org.junit.runners.Parameterized (used on class com.intellij.selenium.shared.pageobject.englishWordDetector.EnglishWordDetectorTest) was not able to satisfy all filter requests.", - "Runner org.junit.runners.Parameterized (used on class com.intellij.sql.SqlLiveTemplatesTest) was not able to satisfy all filter requests.", - "Runner org.junit.runners.Parameterized (used on class com.intellij.sql.completion.AllSqlCompletionTest) was not able to satisfy all filter requests.", - "Runner org.junit.runners.Parameterized (used on class com.intellij.sql.refactoring.SqlExtractNamedQueryTest) was not able to satisfy all filter requests.", - "Runner org.junit.runners.Parameterized (used on class com.jetbrains.rd.platform.codeWithMe.FileManifestUtilTest) was not able to satisfy all filter requests." + "Discovered 4 'junit-platform.properties' configuration files on the classpath (see below); only the first (*) will be used." ); @Override diff --git a/xml/tests/src/com/intellij/codeInsight/template/emmet/EmmetAbbreviationTestSuite.java b/xml/tests/src/com/intellij/codeInsight/template/emmet/EmmetAbbreviationTestSuite.java index e7b0cfc023c6..12dad7f0a7e9 100644 --- a/xml/tests/src/com/intellij/codeInsight/template/emmet/EmmetAbbreviationTestSuite.java +++ b/xml/tests/src/com/intellij/codeInsight/template/emmet/EmmetAbbreviationTestSuite.java @@ -85,7 +85,7 @@ public abstract class EmmetAbbreviationTestSuite extends TestSuite { protected void addTest(String source, String expected, @Nullable TestInitializer setUp, String... extensions) { for (String extension : extensions) { - super.addTest(new EmmetAbbreviation(source, expected, extension, false, setUp) {}); + super.addTest(new EmmetAbbreviation(source, expected, /* name */ source, extension, false, setUp) {}); } } @@ -95,10 +95,18 @@ public abstract class EmmetAbbreviationTestSuite extends TestSuite { protected void addTestWithPositionCheck(String source, String expected, @Nullable TestInitializer setUp, String... extensions) { for (String extension : extensions) { - super.addTest(new EmmetAbbreviation(source, expected, extension, true, setUp) {}); + super.addTest(new EmmetAbbreviation(source, expected, /* name */ source, extension, true, setUp) {}); } } + protected void addTestWithName(String source, String name, String expected, @Nullable TestInitializer setUp, String extension) { + super.addTest(new EmmetAbbreviation(source, expected, name, extension, false, setUp) {}); + } + + protected void addTestWithNameWithPositionCheck(String source, String name, String expected, @Nullable TestInitializer setUp, String extension) { + super.addTest(new EmmetAbbreviation(source, expected, name, extension, true, setUp) {}); + } + @Override public String getName() { return getClass().getName(); @@ -114,6 +122,7 @@ public abstract class EmmetAbbreviationTestSuite extends TestSuite { } private abstract class EmmetAbbreviation extends BasePlatformTestCase { + private final String name; private final String extension; private final String sourceData; private final String expectedData; @@ -124,9 +133,11 @@ public abstract class EmmetAbbreviationTestSuite extends TestSuite { EmmetAbbreviation(@NotNull String sourceData, @NotNull String expectedData, + @NotNull String name, @NotNull String extension, boolean checkPosition, @Nullable TestInitializer initializer) { + this.name = name; this.extension = extension; this.sourceData = sourceData; this.expectedData = expectedData; @@ -219,7 +230,7 @@ public abstract class EmmetAbbreviationTestSuite extends TestSuite { @Override public String toString() { - return (sourceData + " in " + extension).replace('\n', ' ').replaceAll(" ", ""); + return (name + " in " + extension).replace('\n', ' ').replaceAll(" ", ""); } @Override diff --git a/xml/tests/src/com/intellij/codeInsight/template/emmet/HtmlEmmetAbbreviationTest.java b/xml/tests/src/com/intellij/codeInsight/template/emmet/HtmlEmmetAbbreviationTest.java index b3300076012d..7bff5803189b 100644 --- a/xml/tests/src/com/intellij/codeInsight/template/emmet/HtmlEmmetAbbreviationTest.java +++ b/xml/tests/src/com/intellij/codeInsight/template/emmet/HtmlEmmetAbbreviationTest.java @@ -175,7 +175,7 @@ public class HtmlEmmetAbbreviationTest extends EmmetAbbreviationTestSuite { addTest("span#one.two[title data]", ""); addTest("span[title=Hello]", ""); addTest("span[title=\"Hello world\"]", ""); - addTest("span[title=\"Hello world\"]", ""); + addTestWithName("span[title=\"Hello world\"]", "span[title=\"Hello world\"] #2", ""); addTest("span[title=\"Hello world\" data=other]", ""); addTest("span[title=\"Hello world\" data=other attr2 attr3]", ""); @@ -192,7 +192,7 @@ public class HtmlEmmetAbbreviationTest extends EmmetAbbreviationTestSuite { addTest("a[title=Google http://google.com]", ""); addTest("img[image.png]", "\"\""); addTest("link[style.css]", ""); - addTest("script", ""); + addTestWithName("script", "script #2", ""); addTest("script[src]", ""); addTest("script[file.js]", ""); addTest("script[/packages/requiejs/require.js]", ""); @@ -214,13 +214,13 @@ public class HtmlEmmetAbbreviationTest extends EmmetAbbreviationTestSuite { addTestWithInit("div.editor[a. title=test]", "
|
", compactBooleanAllowed(true)); addTestWithInit("b[a.]", "", compactBooleanAllowed(false)); - addTestWithInit("track[default]", "", compactBooleanAllowed(false)); + addTestWithName("track[default]", "track[default] #2", "", compactBooleanAllowed(false)); - addTestWithInit("button:d", "", compactBooleanAllowed(true)); - addTestWithInit("button:d", "", compactBooleanAllowed(false)); + addTestWithName("button:d", "button:d #2", "", compactBooleanAllowed(true)); + addTestWithName("button:d", "button:d #3", "", compactBooleanAllowed(false)); addTestWithInit("input[title]", "", null); - addTestWithInit("input[title]", "", (fixture, testRootDisposable) -> { + addTestWithName("input[title]", "input[title] #2", "", (fixture, testRootDisposable) -> { final HtmlUnknownBooleanAttributeInspection inspection = new HtmlUnknownBooleanAttributeInspection(); inspection.updateAdditionalEntries("title", testRootDisposable); fixture.enableInspections(inspection); @@ -234,7 +234,7 @@ public class HtmlEmmetAbbreviationTest extends EmmetAbbreviationTestSuite { | | """, withAddEndEditPoint(false)); - addTestWithPositionCheck("tr>td+td+td", """ + addTestWithNameWithPositionCheck("tr>td+td+td", "tr>td+td+td #2", """ | | @@ -252,7 +252,7 @@ public class HtmlEmmetAbbreviationTest extends EmmetAbbreviationTestSuite { } private void addExpandosTests() { - addTest("dl+", "
"); + addTestWithName("dl+", "dl+ #2", "
"); addTest("div+div>dl+", "
"); } @@ -338,10 +338,10 @@ public class HtmlEmmetAbbreviationTest extends EmmetAbbreviationTestSuite { } private void addGroupMultiplicationTests() { - addTest("(span.i$)*3", ""); - addTest("p.p$*2>(i.i$+b.b$)*3", + addTestWithName("(span.i$)*3", "(span.i$)*3 #2", ""); + addTestWithName("p.p$*2>(i.i$+b.b$)*3", "p.p$*2>(i.i$+b.b$)*3 #2", "

"); - addTest("(p.i$+ul>li.i$*2>span.s$)*3", + addTestWithName("(p.i$+ul>li.i$*2>span.s$)*3", "(p.i$+ul>li.i$*2>span.s$)*3 #2", "

"); } @@ -403,6 +403,18 @@ public class HtmlEmmetAbbreviationTest extends EmmetAbbreviationTestSuite { addTestWithPositionCheck(source, expected, setUp, "html"); } + private void addTestWithName(String source, String name, String expected) { + addTestWithName(source, name, expected, null); + } + + private void addTestWithName(String source, String name, String expected, @Nullable TestInitializer setUp) { + super.addTestWithName(source, name, expected, setUp, "html"); + } + + private void addTestWithNameWithPositionCheck(String source, String name, String expected, @Nullable TestInitializer setUp) { + super.addTestWithNameWithPositionCheck(source, name, expected, setUp, "html"); + } + @NotNull private static TestInitializer compactBooleanAllowed(final boolean compactBooleanAllowed) { return (fixture, testRootDisposable) -> HtmlUtil diff --git a/xml/tests/src/com/intellij/codeInsight/template/emmet/XslEmmetAbbreviationTest.java b/xml/tests/src/com/intellij/codeInsight/template/emmet/XslEmmetAbbreviationTest.java index f9bc57016e59..f0da4a014a8a 100644 --- a/xml/tests/src/com/intellij/codeInsight/template/emmet/XslEmmetAbbreviationTest.java +++ b/xml/tests/src/com/intellij/codeInsight/template/emmet/XslEmmetAbbreviationTest.java @@ -30,11 +30,11 @@ public class XslEmmetAbbreviationTest extends EmmetAbbreviationTestSuite { * Tests from https://github.com/emmetio/emmet/blob/master/javascript/unittest/tests/expandAbbreviation.js */ public void addXslTests() { - addTest("tmatch", "", "xsl"); - addTest("choose", "", "xsl"); + super.addTestWithName("tmatch", "tmatch #2", "", null, "xsl"); + super.addTestWithName("choose", "choose #2", "", null, "xsl"); addTest("xsl:variable>div+p", "

", "xsl"); addTest("var>div+p", "

", "xsl"); - addTest("ap", "", "xsl"); + super.addTestWithName("ap", "ap #2", "", null, "xsl"); addTest("ap>wp*2", "", "xsl"); diff --git a/xml/tests/src/com/intellij/codeInsight/template/emmet/filters/BemEmmetFilterTest.java b/xml/tests/src/com/intellij/codeInsight/template/emmet/filters/BemEmmetFilterTest.java index d0dfbeb1c243..365abe83855f 100644 --- a/xml/tests/src/com/intellij/codeInsight/template/emmet/filters/BemEmmetFilterTest.java +++ b/xml/tests/src/com/intellij/codeInsight/template/emmet/filters/BemEmmetFilterTest.java @@ -32,7 +32,7 @@ public class BemEmmetFilterTest extends EmmetAbbreviationTestSuite { addTest(".b1>.b2_m1>.__e1+.____e2_m2|bem", "
\n\t
\n\t\t
\n\t\t
\n\t
\n
"); addTest(".b>.__e1>.__e2|bem", "
\n\t
\n\t\t
\n\t
\n
"); - addTest(".b>.__e1>.____e2|bem", "
\n\t
\n\t\t
\n\t
\n
"); + addTestWithName(".b>.__e1>.____e2|bem", ".b>.__e1>.____e2|bem #2", "
\n\t
\n\t\t
\n\t
\n
"); addTest(".b._mod|bem", "
"); addTest("form.search-form._wide>input.-query-string+input:s.-btn_large|bem", "
"); - addTest(".b._mod|bem", "
"); + addTestWithName(".b_m1._m2|bem", ".b_m1._m2|bem #2", "
"); + addTestWithName(".b._mod|bem", ".b._mod|bem #2", "
"); } private void addRegressionTests() { @@ -64,7 +64,7 @@ public class BemEmmetFilterTest extends EmmetAbbreviationTestSuite { private void addConfigurableTests() { addTest(".b9m|bem", "
", createBemTestInitializer("__", "9", "-"), "html"); - addTest(".b9m|bem", "
", createBemTestInitializer("", "", ""), "html"); + addTestWithName(".b9m|bem", ".b9m|bem #2", "
", createBemTestInitializer("", "", ""), "html"); addTest(".b>.Ыe|bem", """
@@ -94,4 +94,8 @@ public class BemEmmetFilterTest extends EmmetAbbreviationTestSuite { private void addTest(String sourceData, String expectedData) { addTest(sourceData, expectedData, "html"); } + + private void addTestWithName(String sourceData, String name, String expectedData) { + super.addTestWithName(sourceData, name, expectedData, null, "html"); + } }