mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
Avoiding printing anything unless there is actually a failure.
Also take advantage of JUnit’s ability to show the exact spot of a mismatch between two strings.
This commit is contained in:
1 parent
c454eaacf4
commit
e94152df33
1 file changed
+2
-3
@@ -176,10 +176,9 @@ public class CronTabTest {
|
||||
/**
|
||||
* Humans can't easily see difference in two {@link Calendar}s, do help the diagnosis by using {@link DateFormat}.
|
||||
*/
|
||||
private void compare(Calendar a, Calendar b) {
|
||||
private void compare(Calendar expected, Calendar actual) {
|
||||
DateFormat f = DateFormat.getDateTimeInstance();
|
||||
System.out.println(f.format(a.getTime())+" vs "+f.format(b.getTime()));
|
||||
assertEquals(a,b);
|
||||
assertEquals(f.format(expected.getTime()), f.format(actual.getTime()));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user