1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-11-03 04:17:18 -05:00

Fix variable name inside test macro

This commit is contained in:
Moritz Grimm 2015-05-21 01:27:28 +02:00
parent 5350b3be79
commit 6c6e758626

View File

@ -507,19 +507,19 @@ START_TEST(test_encoder_get)
END_TEST END_TEST
#define TEST_ENC_XSTRDUP(s, g) do { \ #define TEST_ENC_XSTRDUP(s, g) do { \
cfg_encoder_t dec = cfg_encoder_get(#s); \ cfg_encoder_t enc = cfg_encoder_get(#s); \
const char *errstr; \ const char *errstr; \
\ \
errstr = NULL; \ errstr = NULL; \
ck_assert_int_ne(s(dec, NULL, &errstr), 0); \ ck_assert_int_ne(s(enc, NULL, &errstr), 0); \
ck_assert_str_eq(errstr, "empty"); \ ck_assert_str_eq(errstr, "empty"); \
ck_assert_int_ne(s(dec, "", NULL), 0); \ ck_assert_int_ne(s(enc, "", NULL), 0); \
\ \
ck_assert_int_eq(s(dec, "test", NULL), 0); \ ck_assert_int_eq(s(enc, "test", NULL), 0); \
ck_assert_str_eq(g(dec), "test"); \ ck_assert_str_eq(g(enc), "test"); \
\ \
ck_assert_int_eq(s(dec, #s, NULL), 0); \ ck_assert_int_eq(s(enc, #s, NULL), 0); \
ck_assert_str_eq(g(dec), #s); \ ck_assert_str_eq(g(enc), #s); \
} while (0) } while (0)
START_TEST(test_encoder_set_name) START_TEST(test_encoder_set_name)