Skip to content

Commit 656a2ef

Browse files
Switch test harness to print errors in decimal (#1100)
1 parent ae7b067 commit 656a2ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/aws/testing/aws_test_harness.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static int s_cunit_failure_message0(
147147
if (assert_rv != AWS_OP_SUCCESS) { \
148148
if (!PRINT_FAIL_INTERNAL0(__VA_ARGS__)) { \
149149
PRINT_FAIL_INTERNAL0( \
150-
"Expected success at %s; got return value %d with last error 0x%04x\n", \
150+
"Expected success at %s; got return value %d with last error 0x%04d\n", \
151151
#condition, \
152152
assert_rv, \
153153
aws_last_error()); \
@@ -162,7 +162,7 @@ static int s_cunit_failure_message0(
162162
if (assert_rv != AWS_OP_ERR) { \
163163
if (!PRINT_FAIL_INTERNAL0(__VA_ARGS__)) { \
164164
PRINT_FAIL_INTERNAL0( \
165-
"Expected failure at %s; got return value %d with last error 0x%04x\n", \
165+
"Expected failure at %s; got return value %d with last error 0x%04d\n", \
166166
#condition, \
167167
assert_rv, \
168168
aws_last_error()); \
@@ -179,7 +179,7 @@ static int s_cunit_failure_message0(
179179
if (assert_rv != AWS_OP_ERR) { \
180180
fprintf( \
181181
AWS_TESTING_REPORT_FD, \
182-
"%sExpected error but no error occurred; rv=%d, aws_last_error=%04x (expected %04x): ", \
182+
"%sExpected error but no error occurred; rv=%d, aws_last_error=%04d (expected %04d): ", \
183183
FAIL_PREFIX, \
184184
assert_rv, \
185185
assert_err, \
@@ -192,7 +192,7 @@ static int s_cunit_failure_message0(
192192
if (assert_err != assert_err_expect) { \
193193
fprintf( \
194194
AWS_TESTING_REPORT_FD, \
195-
"%sIncorrect error code; aws_last_error=%04x (expected %04x): ", \
195+
"%sIncorrect error code; aws_last_error=%04d (expected %04d): ", \
196196
FAIL_PREFIX, \
197197
assert_err, \
198198
assert_err_expect); \

0 commit comments

Comments
 (0)