diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2013-06-14 11:31:16 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2013-06-14 11:31:16 -0700 |
commit | f43244721d1ad557a0e5e24a8fdc5a27c6da79af (patch) | |
tree | d33d00fcc72c100fd44485f7194a6cbd488ad426 /tests | |
parent | 996a47470aa972410a15989ca8ecb3901056396f (diff) | |
download | rabbitmq-c-github-ask-f43244721d1ad557a0e5e24a8fdc5a27c6da79af.tar.gz |
Correct usage of amqp_error_string in test code
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_parse_url.c | 2 | ||||
-rw-r--r-- | tests/test_tables.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_parse_url.c b/tests/test_parse_url.c index da3e681..cb4f59d 100644 --- a/tests/test_parse_url.c +++ b/tests/test_parse_url.c @@ -78,7 +78,7 @@ static void parse_success(const char *url, if (res) { fprintf(stderr, "Expected to successfully parse URL, but didn't: %s (%s)\n", - url, amqp_error_string(-res)); + url, amqp_error_string2(res)); abort(); } diff --git a/tests/test_tables.c b/tests/test_tables.c index f7144dd..cf2509e 100644 --- a/tests/test_tables.c +++ b/tests/test_tables.c @@ -369,7 +369,7 @@ static void test_table_codec(FILE *out) result = amqp_decode_table(decoding_bytes, &pool, &decoded, &decoding_offset); if (result < 0) { - die("Table decoding failed: %s", amqp_error_string(-result)); + die("Table decoding failed: %s", amqp_error_string2(result)); } fprintf(out, "BBBBBBBBBB\n"); @@ -394,7 +394,7 @@ static void test_table_codec(FILE *out) result = amqp_encode_table(encoding_result, &table, &offset); if (result < 0) { - die("Table encoding failed: %s", amqp_error_string(-result)); + die("Table encoding failed: %s", amqp_error_string2(result)); } if (offset != sizeof(pre_encoded_table)) |