mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
update junit 5 to M4 (IDEA-170817)
This commit is contained in:
Generated
+7
-6
@@ -1,12 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="junit5_rt">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-jupiter-engine-5.0.0-M3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-platform-commons-1.0.0-M3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-platform-engine-1.0.0-M3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-platform-launcher-1.0.0-M3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-platform-runner-1.0.0-M3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-vintage-engine-4.12.0-M3.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-jupiter-engine-5.0.0-M4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-platform-commons-1.0.0-M4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-platform-engine-1.0.0-M4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-platform-launcher-1.0.0-M4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-platform-runner-1.0.0-M4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-vintage-engine-4.12.0-M4.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/junit-platform-suite-api-1.0.0-M4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
Generated
+1
-1
@@ -1,7 +1,7 @@
|
||||
<component name="libraryTable">
|
||||
<library name="opentest4j">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/opentest4j-1.0.0-M1.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/plugins/junit5_rt/lib/opentest4j-1.0.0-M2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
+1
-1
@@ -200,7 +200,7 @@ class CommunityRepositoryModules {
|
||||
withModule("junit5_rt", "junit5-rt.jar")
|
||||
withProjectLibrary("junit5_rt")
|
||||
withProjectLibrary("opentest4j")
|
||||
withModuleLibrary("junit-jupiter-api-5.0.0-M3.jar", "junit5_rt_tests", "")
|
||||
withModuleLibrary("junit-jupiter-api-5.0.0-M4.jar", "junit5_rt_tests", "")
|
||||
},
|
||||
plugin("ByteCodeViewer") {
|
||||
mainJarName = "byteCodeViewer.jar"
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -219,7 +219,7 @@ public class JUnit5TestExecutionListener implements TestExecutionListener {
|
||||
if (ex != null) {
|
||||
ComparisonFailureData failureData = null;
|
||||
if (ex instanceof MultipleFailuresError && ((MultipleFailuresError)ex).hasFailures()) {
|
||||
for (AssertionError assertionError : ((MultipleFailuresError)ex).getFailures()) {
|
||||
for (Throwable assertionError : ((MultipleFailuresError)ex).getFailures()) {
|
||||
testFailure(methodName, id, messageName, assertionError, duration, reason, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../junit5_rt/lib/junit-jupiter-api-5.0.0-M3.jar!/" />
|
||||
<root url="jar://$MODULE_DIR$/../junit5_rt/lib/junit-jupiter-api-5.0.0-M4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.junit5;
|
||||
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import jetbrains.buildServer.messages.serviceMessages.MapSerializerUtil;
|
||||
import org.junit.jupiter.api.*;
|
||||
import org.junit.jupiter.engine.descriptor.ClassTestDescriptor;
|
||||
import org.junit.jupiter.engine.descriptor.MethodTestDescriptor;
|
||||
@@ -31,6 +32,7 @@ import org.opentest4j.MultipleFailuresError;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@@ -72,12 +74,13 @@ class JUnit5EventsTest {
|
||||
TestClass.class.getDeclaredMethod("test1"));
|
||||
TestIdentifier identifier = TestIdentifier.from(testDescriptor);
|
||||
myExecutionListener.executionStarted(identifier);
|
||||
MultipleFailuresError multipleFailuresError = new MultipleFailuresError("2 errors");
|
||||
multipleFailuresError.addFailure(new AssertionFailedError("message1", "expected1", "actual1"));
|
||||
multipleFailuresError.addFailure(new AssertionFailedError("message2", "expected2", "actual2"));
|
||||
MultipleFailuresError multipleFailuresError = new MultipleFailuresError("2 errors", Arrays.asList
|
||||
(new AssertionFailedError("message1", "expected1", "actual1"),
|
||||
new AssertionFailedError("message2", "expected2", "actual2")));
|
||||
myExecutionListener.executionFinished(identifier, TestExecutionResult.failed(multipleFailuresError));
|
||||
|
||||
|
||||
String lineSeparator = MapSerializerUtil.escapeStr(System.getProperty("line.separator"), MapSerializerUtil.STD_ESCAPER);
|
||||
Assertions.assertEquals("##teamcity[enteredTheMatrix]\n" +
|
||||
"\n" +
|
||||
"##teamcity[testStarted id='|[engine:engine|]' name='test1()' locationHint='java:test://com.intellij.junit5.JUnit5EventsTest$TestClass.test1']\n" +
|
||||
@@ -86,7 +89,7 @@ class JUnit5EventsTest {
|
||||
"\n" +
|
||||
"##teamcity[testFailed name='test1()' id='|[engine:engine|]' details='' message='' expected='expected2' actual='actual2']\n" +
|
||||
"\n" +
|
||||
"##teamcity[testFailed name='test1()' id='|[engine:engine|]' details='TRACE' message='2 errors (2 failures)|n\tmessage1|n\tmessage2']\n" +
|
||||
"##teamcity[testFailed name='test1()' id='|[engine:engine|]' details='TRACE' message='2 errors (2 failures)" + lineSeparator + "\tmessage1" + lineSeparator + "\tmessage2']\n" +
|
||||
"\n" +
|
||||
"##teamcity[testFinished id='|[engine:engine|]' name='test1()']\n", StringUtil.convertLineSeparators(myBuf.toString()));
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.junit.platform.engine.UniqueId;
|
||||
import org.junit.platform.engine.support.descriptor.*;
|
||||
import org.junit.platform.launcher.TestIdentifier;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -101,18 +102,18 @@ class JUnit5NavigationTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void locationHintValueForFileSource() {
|
||||
void locationHintValueForFileSource() throws IOException {
|
||||
myTestSource = new FileSource(Paths.get("/some/file.txt").toFile());
|
||||
|
||||
Assertions.assertEquals("file:///some/file.txt", locationHintValue());
|
||||
Assertions.assertEquals("file://" + ((FileSource)myTestSource).getFile().getCanonicalPath(), locationHintValue());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
void locationHintValueForFileSourceWithLineInformation() {
|
||||
void locationHintValueForFileSourceWithLineInformation() throws IOException {
|
||||
myTestSource = new FileSource(Paths.get("/some/file.txt").toFile(), new FilePosition(22, 7));
|
||||
|
||||
Assertions.assertEquals("file:///some/file.txt:22", locationHintValue());
|
||||
Assertions.assertEquals("file://" + ((FileSource)myTestSource).getFile().getCanonicalPath() +":22", locationHintValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -179,13 +180,8 @@ class JUnit5NavigationTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isContainer() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTest() {
|
||||
return myIsTest;
|
||||
public Type getType() {
|
||||
return myIsTest ? Type.TEST : Type.CONTAINER;
|
||||
}
|
||||
|
||||
public void isTest(boolean isTest) {
|
||||
|
||||
Reference in New Issue
Block a user