| 1 | // Copyright 2007 - 2021, Alan Antonuk and the rabbitmq-c contributors.cxx . . $ `<file>/tests/test_status_enum.c`/ |
| 2 | // SPDX-License-Identifier: mit |
| 3 | |
| 4 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:413:9`! |
| 5 | #include "config.h"cxx . . $ `<file>/build/librabbitmq/config.h`/ |
| 6 | #endif |
| 7 | |
| 8 | #include <rabbitmq-c/amqp.h>cxx . . $ `<file>/include/rabbitmq-c/amqp.h`/ |
| 9 | |
| 10 | #include <stdio.h> |
| 11 | #include <stdlib.h> |
| 12 | #include <string.h> |
| 13 | |
| 14 | static void check_errorstringscxx . . $ check_errorstrings(f44d4a992b651fb5).(amqp_status_enumcxx . . $ amqp_status_enum# start, amqp_status_enumcxx . . $ amqp_status_enum# end) { |
| 15 | int i; |
| 16 | for (i = start; i > end; --i) { |
| 17 | const char* err = amqp_error_string2cxx . . $ amqp_error_string2(f7ae7e56280f18ae).(i); |
| 18 | if (0 == strcmpcxx . . $ strcmp(5ae29d726ae57f88).(err, "(unknown error)")) { |
| 19 | printfcxx . . $ printf(581fddd72a8db8fc).("amqp_status_enum value %s%X", i < 0 ? "-" : "", (unsigned)i); |
| 20 | abortcxx . . $ abort(8df32a62017fbbf6).(); |
| 21 | } |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | int maincxx . . $ main(b126dc7c1de90089).(void) { |
| 26 | check_errorstringscxx . . $ check_errorstrings(f44d4a992b651fb5).(AMQP_STATUS_OKcxx . . $ AMQP_STATUS_OK., _AMQP_STATUS_NEXT_VALUEcxx . . $ _AMQP_STATUS_NEXT_VALUE.); |
| 27 | check_errorstringscxx . . $ check_errorstrings(f44d4a992b651fb5).(AMQP_STATUS_TCP_ERRORcxx . . $ AMQP_STATUS_TCP_ERROR., _AMQP_STATUS_TCP_NEXT_VALUEcxx . . $ _AMQP_STATUS_TCP_NEXT_VALUE.); |
| 28 | check_errorstringscxx . . $ check_errorstrings(f44d4a992b651fb5).(AMQP_STATUS_SSL_ERRORcxx . . $ AMQP_STATUS_SSL_ERROR., _AMQP_STATUS_SSL_NEXT_VALUEcxx . . $ _AMQP_STATUS_SSL_NEXT_VALUE.); |
| 29 | |
| 30 | return 0; |
| 31 | } |