8080775: Better argument formatting for assert() and friends

Reviewed-by: kbarrett, pliden
This commit is contained in:
David Lindholm 2015-09-29 11:02:08 +02:00
parent aa0818a98a
commit 1e71f67736
225 changed files with 1342 additions and 1432 deletions

View file

@ -543,7 +543,7 @@ void test_loggc_filename() {
memset(longest_name, 'a', sizeof(longest_name));
longest_name[JVM_MAXPATHLEN - 1] = '\0';
o_result = make_log_name_internal((const char*)&longest_name, NULL, pid, tms);
assert(strcmp(longest_name, o_result) == 0, err_msg("longest name does not match. expected '%s' but got '%s'", longest_name, o_result));
assert(strcmp(longest_name, o_result) == 0, "longest name does not match. expected '%s' but got '%s'", longest_name, o_result);
FREE_C_HEAP_ARRAY(char, o_result);
}
@ -554,7 +554,7 @@ void test_loggc_filename() {
memset(too_long_name, 'a', too_long_length);
too_long_name[too_long_length - 1] = '\0';
o_result = make_log_name_internal((const char*)&too_long_name, NULL, pid, tms);
assert(o_result == NULL, err_msg("Too long file name should return NULL, but got '%s'", o_result));
assert(o_result == NULL, "Too long file name should return NULL, but got '%s'", o_result);
}
{
@ -565,7 +565,7 @@ void test_loggc_filename() {
longest_name[JVM_MAXPATHLEN - 2] = 't';
longest_name[JVM_MAXPATHLEN - 1] = '\0';
o_result = make_log_name_internal((const char*)&longest_name, NULL, pid, tms);
assert(o_result == NULL, err_msg("Too long file name after timestamp expansion should return NULL, but got '%s'", o_result));
assert(o_result == NULL, "Too long file name after timestamp expansion should return NULL, but got '%s'", o_result);
}
{
@ -576,7 +576,7 @@ void test_loggc_filename() {
longest_name[JVM_MAXPATHLEN - 2] = 'p';
longest_name[JVM_MAXPATHLEN - 1] = '\0';
o_result = make_log_name_internal((const char*)&longest_name, NULL, pid, tms);
assert(o_result == NULL, err_msg("Too long file name after pid expansion should return NULL, but got '%s'", o_result));
assert(o_result == NULL, "Too long file name after pid expansion should return NULL, but got '%s'", o_result);
}
}
#endif // PRODUCT