diff --git a/test/hotspot/gtest/utilities/test_globalDefinitions.cpp b/test/hotspot/gtest/utilities/test_globalDefinitions.cpp index fea8b87e376a6..6ab4c06d9cdee 100644 --- a/test/hotspot/gtest/utilities/test_globalDefinitions.cpp +++ b/test/hotspot/gtest/utilities/test_globalDefinitions.cpp @@ -269,6 +269,8 @@ TEST(globalDefinitions, format_specifiers) { check_format("%+zd", (ssize_t)-123, "-123"); check_format("%+zd", (ssize_t)2147483647, "+2147483647"); check_format("%+zd", (ssize_t)-2147483647, "-2147483647"); + check_format("%5zd", (ssize_t)123, " 123"); + check_format("%-5zd", (ssize_t)123, "123 "); check_format(SIZE_FORMAT, (size_t)123u, "123"); check_format(SIZE_FORMAT_X, (size_t)0x123u, "0x123"); check_format(SIZE_FORMAT_X_0, (size_t)0x123u, "0x" LP64_ONLY("00000000") "00000123");