Show Java version in assertion failure message.

This commit is contained in:
Gary Gregory 2020-12-29 11:45:04 -05:00
parent 5157875ce5
commit 8aff0a08f2
1 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,7 @@
import org.apache.commons.lang3.LocaleUtils;
import org.apache.commons.lang3.SerializationUtils;
import org.apache.commons.lang3.SystemUtils;
import org.apache.commons.lang3.function.TriFunction;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
@ -130,7 +131,8 @@ static void checkParse(final Locale locale, final SimpleDateFormat sdf, final Da
try {
final Date expectedTime = sdf.parse(formattedDate);
final Date actualTime = fdf.parse(formattedDate);
assertEquals(expectedTime, actualTime, "locale : " + locale + " formattedDate : " + formattedDate + "\n");
assertEquals(expectedTime, actualTime, "locale : " + locale + ", formattedDate : " + formattedDate
+ ", Java: " + SystemUtils.JAVA_RUNTIME_VERSION + "\n");
} catch (final Exception e) {
fail("locale : " + locale + " formattedDate : " + formattedDate + " error : " + e + "\n", e);
}