Skip to content

Commit

Permalink
exclude $WhenMappings inner class in JUnit Platform
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyguava committed May 11, 2024
1 parent 2859667 commit e45a031
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ org.gradle.jvmargs=-Xmx2700m -XX:MaxMetaspaceSize=768m -XX:+HeapDumpOnOutOfMemor
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configuration-cache=true
org.gradle.ignoreBuildJavaVersionCheck=true
systemProp.gradle.publish.skip.namespace.check=true
# Kotlin DSL settings
org.gradle.kotlin.dsl.allWarningsAsErrors=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* a detection or filename scan is performed to find test classes.
*/
public class DefaultTestClassScanner implements Runnable {
private static final Pattern ANONYMOUS_CLASS_NAME = Pattern.compile(".*\\$\\d+");
private static final Pattern ANONYMOUS_CLASS_NAME = Pattern.compile(".*\\$\\d+(?:\\$WhenMappings)?");
private final FileTree candidateClassFiles;
private final TestFrameworkDetector testFrameworkDetector;
private final TestClassProcessor testClassProcessor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class DefaultTestClassScannerTest extends Specification {
assert visitor
visitor.visitFile(stubFileVisitDetails('AnonymousClass$1'))
visitor.visitFile(stubFileVisitDetails('AnonymousClass$1$22'))
visitor.visitFile(stubFileVisitDetails('AnonymousClass$1$22$WhenMappings'))
}

0 * _._
Expand Down
6 changes: 3 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ gradle.settingsEvaluated {
return@settingsEvaluated
}

if (!JavaVersion.current().isJava11) {
throw GradleException("This build requires JDK 11. It's currently ${getBuildJavaHome()}. You can ignore this check by passing '-Dorg.gradle.ignoreBuildJavaVersionCheck=true'.")
}
// if (!JavaVersion.current().isJava11) {
// throw GradleException("This build requires JDK 11. It's currently ${getBuildJavaHome()}. You can ignore this check by passing '-Dorg.gradle.ignoreBuildJavaVersionCheck=true'.")
// }
}

// region platform include DSL
Expand Down

0 comments on commit e45a031

Please sign in to comment.