mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||
|
Date: Thu, 3 Dec 2020 14:04:57 -0800
|
||
|
Subject: [PATCH] Better AnnotationTest printout
|
||
|
|
||
|
|
||
|
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||
|
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||
|
@@ -0,0 +0,0 @@ public class AnnotationTest {
|
||
|
|
||
|
Collections.sort(errors);
|
||
|
|
||
|
- System.out.println(errors.size() + " missing annotation(s):");
|
||
|
+ StringBuilder builder = new StringBuilder()
|
||
|
+ .append("There ")
|
||
|
+ .append(errors.size() != 1 ? "are " : "is ")
|
||
|
+ .append(errors.size())
|
||
|
+ .append(" missing annotation")
|
||
|
+ .append(errors.size() != 1 ? "s:\n" : ":\n");
|
||
|
+
|
||
|
for (String message : errors) {
|
||
|
- System.out.print("\t");
|
||
|
- System.out.println(message);
|
||
|
+ builder.append("\t").append(message).append("\n");
|
||
|
}
|
||
|
|
||
|
- Assert.fail("There " + errors.size() + " are missing annotation(s)");
|
||
|
+ Assert.fail(builder.toString());
|
||
|
}
|
||
|
|
||
|
private static void collectClasses(@NotNull File from, @NotNull Map<String, ClassNode> to) throws IOException {
|