diff options
author | Pavel Tvrdik <pawel.tvrdik@gmail.com> | 2016-11-11 17:43:09 +0100 |
---|---|---|
committer | Pavel Tvrdik <pawel.tvrdik@gmail.com> | 2016-11-11 17:43:09 +0100 |
commit | 5e3cd0e5b56e6c58cfba4d0d38fbbbed3657889d (patch) | |
tree | 3e96b946c06176731b1d2ba27605dc257ef9c7bc /test/birdtest.h | |
parent | fa71b268a8d15d579f50d7f4f92e2edb3b431e05 (diff) |
Birdtest: Replace BT_SUCCESS and BT_FAILURE with 1 and 0
Diffstat (limited to 'test/birdtest.h')
-rw-r--r-- | test/birdtest.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/test/birdtest.h b/test/birdtest.h index 0090712d..4443bfc1 100644 --- a/test/birdtest.h +++ b/test/birdtest.h @@ -38,9 +38,6 @@ long int bt_random(void); void bt_log_suite_result(int result, const char *fmt, ...); void bt_log_suite_case_result(int result, const char *fmt, ...); -#define BT_SUCCESS 42 /* 1 is too usual, filter quitbird returns 1 too */ -#define BT_FAILURE 0 - #define BT_TIMEOUT 5 /* Default timeout in seconds */ #define BT_FORKING 1 /* Forking is enabled in default */ @@ -101,12 +98,12 @@ void bt_log_suite_case_result(int result, const char *fmt, ...); #define bt_assert_msg(test, format, ...) \ do \ { \ - int bt_suit_case_result = BT_SUCCESS; \ + int bt_suit_case_result = 1; \ if ((test) == 0) \ { \ - bt_result = BT_FAILURE; \ - bt_suite_result = BT_FAILURE; \ - bt_suit_case_result = BT_FAILURE; \ + bt_result = 0; \ + bt_suite_result = 0; \ + bt_suit_case_result = 0; \ } \ bt_log_suite_case_result(bt_suit_case_result, format, ##__VA_ARGS__); \ } while (0) @@ -149,14 +146,13 @@ struct bt_batch { * @expected_out: expected data from tested function * * Input arguments should not be stringified using in_fmt() or out_fmt() - * function already. This function should return only BT_SUCCESS or - * BT_FAILURE */ + * function already. This function should return only 0 or 1 */ int (*test_fn)(void *out, const void *in, const void *expected_out); /* Name of testing function @test_fn */ const char *test_fn_name; - /* Number of items in data*/ + /* Number of items in data */ int ndata; /* Array of input and expected output pairs */ |