Skip to content

Commit

Permalink
Remove munit.internal.junitinterface.PendingCommentTag
Browse files Browse the repository at this point in the history
  • Loading branch information
jnd-au committed Oct 10, 2024
1 parent 5f449f4 commit 4e35b44
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,13 @@ void logTo(RichLogger logger) {
if (annotation instanceof Tag) {
Tag tag = (Tag) annotation;
if (tag instanceof PendingTag) {
isPending = true;
}
else if (tag instanceof PendingCommentTag) {
builder.append(" ");
builder.append(tag.value());
if (tag.value().equals("Pending")) {
isPending = true;
}
else {
builder.append(" ");
builder.append(tag.value());
}
}
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import org.junit.runner.notification.RunNotifier

import scala.collection.mutable

import munit.Pending

class MUnitRunNotifier(reporter: JUnitReporter) extends RunNotifier {
var ignored = 0
var total = 0
Expand All @@ -26,13 +28,10 @@ class MUnitRunNotifier(reporter: JUnitReporter) extends RunNotifier {
isReported += description
val pendingSuffixes = {
val annotations = description.getAnnotations
val isPending = annotations.collect { case munit.Pending =>
"PENDING"
}.distinct
val pendingComments = annotations.collect {
case tag: munit.PendingComment => tag.value
}
isPending ++ pendingComments
val (isPending, pendingComments) = annotations.collect {
case pending: PendingTag => pending
}.partition(_.equals(Pending))
isPending.distinct.map(_.value.toUpperCase) ++ pendingComments.map(_.value)
}
reporter.reportTestIgnored(
description.getMethodName,
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions munit/shared/src/main/scala/munit/package.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import munit.internal.junitinterface.{PendingCommentTag, PendingTag}
import munit.internal.junitinterface.PendingTag

package object munit {
case class PendingComment(override val value: String) extends Tag(value) with PendingCommentTag
case class PendingComment(override val value: String) extends Tag(value) with PendingTag

val Ignore = new Tag("Ignore")
val Only = new Tag("Only")
Expand Down

0 comments on commit 4e35b44

Please sign in to comment.