Skip to content

Commit 2991cb9

Browse files
author
edelgadoh
committed
Adding labels to split StopWatch feature - line separator
1 parent f64e4cd commit 2991cb9

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/test/java/org/apache/commons/lang3/time/StopWatchTest.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,9 @@ void testSplitsWithStringLabels() {
541541
final String updatedReport = report.replaceAll("4\\d\\d", "4**").replaceAll("2\\d\\d", "2**").replaceAll("1\\d\\d", "1**");
542542

543543
assertEquals(
544-
"\none 00:00:00.4**" +
545-
"\ntwo 00:00:00.2**" +
546-
"\nthree 00:00:00.1**",
544+
System.lineSeparator() + "one 00:00:00.4**" +
545+
System.lineSeparator() + "two 00:00:00.2**" +
546+
System.lineSeparator() + "three 00:00:00.1**",
547547
updatedReport
548548
);
549549
}
@@ -588,9 +588,9 @@ void testSplitsWithIntLabels() {
588588
final String updatedReport = report.replaceAll("4\\d\\d", "4**").replaceAll("2\\d\\d", "2**").replaceAll("1\\d\\d", "1**");
589589

590590
assertEquals(
591-
"\n1 00:00:00.4**" +
592-
"\n2 00:00:00.2**" +
593-
"\n3 00:00:00.1**",
591+
System.lineSeparator() + "1 00:00:00.4**" +
592+
System.lineSeparator() + "2 00:00:00.2**" +
593+
System.lineSeparator() + "3 00:00:00.1**",
594594
updatedReport
595595
);
596596
}
@@ -619,9 +619,8 @@ void testNanoSplitsWithLabel() {
619619
final String report = watch.getNanoReport();
620620
final String updatedReport = report.replaceAll(" 10\\d+", " 10*******").replaceAll(" 20\\d+", " 20*******");
621621

622-
assertEquals(
623-
"\ncoding 10*******" +
624-
"\neating 20*******",
622+
assertEquals(System.lineSeparator() + "coding 10*******" +
623+
System.lineSeparator() + "eating 20*******",
625624
updatedReport
626625
);
627626
}

0 commit comments

Comments
 (0)