Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8274274: Update JUnit to version 5.8.1 #97

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1854,7 +1854,18 @@ allprojects {
// By default all of our projects require junit for testing so we can just
// setup this dependency here.
dependencies {
testImplementation group: "junit", name: "junit", version: "4.8.2"
testImplementation group: "junit", name: "junit", version: "4.13.2"
testImplementation group: "org.hamcrest", name: "hamcrest-core", version: "1.3"
testImplementation group: "org.junit.jupiter", name: "junit-jupiter", version: "5.8.1"
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-api", version: "5.8.1"
testRuntimeOnly group: "org.apiguardian", name: "apiguardian-api", version: "1.1.2"
testRuntimeOnly group: "org.junit.jupiter", name: "junit-jupiter-engine", version: "5.8.1"
testRuntimeOnly group: "org.junit.jupiter", name: "junit-jupiter-params", version: "5.8.1"
testRuntimeOnly group: "org.junit.platform", name: "junit-platform-commons", version: "1.8.1"
testRuntimeOnly group: "org.junit.platform", name: "junit-platform-engine", version: "1.8.1"
testRuntimeOnly group: "org.junit.vintage", name: "junit-vintage-engine", version: "5.8.1"
testRuntimeOnly group: "org.opentest4j", name: "opentest4j", version: "1.2.0"

if (BUILD_CLOSED && DO_JCOV) {
testImplementation name: "jcov"
}
@@ -1869,6 +1880,8 @@ allprojects {
// Java 7 but when we switch to 8 this will be needed, and probably again when
// we start building with Java 9.
test {
useJUnitPlatform();

executable = JAVA;
enableAssertions = true;
testLogging.exceptionFormat = "full";
@@ -1953,7 +1966,6 @@ project(":base") {
}

dependencies {
testImplementation group: "junit", name: "junit", version: "4.8.2"
testImplementation sourceSets.main.output
testImplementation sourceSets.shims.output
}
@@ -2029,8 +2041,6 @@ project(":graphics") {
}

dependencies {
stubImplementation group: "junit", name: "junit", version: "4.8.2"

antlr group: "org.antlr", name: "antlr4", version: "4.7.2", classifier: "complete"
implementation project(':base')
}
@@ -74,7 +74,8 @@ repositories {
}

dependencies {
testImplementation group: "junit", name: "junit", version: "4.8.2"
testImplementation group: "junit", name: "junit", version: "4.13.2"
testImplementation group: "org.hamcrest", name: "hamcrest-core", version: "1.3"
}

// At the moment the ASM library shipped with Gradle that is used to
@@ -18,6 +18,11 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

package test;

import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.junit.jupiter.api.Test;

public class JUnit5Test {

@Test
void junit5ShouldWork() {
System.err.println("JUnit 5 test working!");
assertNotNull(this);
}
}