commit c5a011bc9ea83beb75084813835e0dd99e60ca68 Author: Zack Weinberg zackw@panix.com Date: Wed Jul 13 15:13:17 2011 -0700
Remove stray semicolons from tinytest_macros.h, and add missing ones to unittest_obfs2.c. --- src/test/tinytest_macros.h | 4 ++-- src/test/unittest_obfs2.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/test/tinytest_macros.h b/src/test/tinytest_macros.h index 9a67e71..089616a 100644 --- a/src/test/tinytest_macros.h +++ b/src/test/tinytest_macros.h @@ -99,11 +99,11 @@
/* Assert b, but do not stop the test if b fails. Log msg on failure. */ #define tt_want_msg(b, msg) \ - _tt_want(b, msg, ); + _tt_want(b, msg, )
/* Assert b and stop the test if b fails. Log msg on failure. */ #define tt_assert_msg(b, msg) \ - _tt_want(b, msg, TT_EXIT_TEST_FUNCTION); + _tt_want(b, msg, TT_EXIT_TEST_FUNCTION)
/* Assert b, but do not stop the test if b fails. */ #define tt_want(b) tt_want_msg( (b), "want("#b")") diff --git a/src/test/unittest_obfs2.c b/src/test/unittest_obfs2.c index b3db0be..11dcb16 100644 --- a/src/test/unittest_obfs2.c +++ b/src/test/unittest_obfs2.c @@ -44,31 +44,31 @@ test_obfs2_option_parsing(void *data)
/** unknown arg */ OPTV(options3) = {"obfs2", "--gabura=a", "server", "127.0.0.1:5552"}; - tt_assert(proto_params_init(ALEN(options3), options3) == NULL) + tt_assert(proto_params_init(ALEN(options3), options3) == NULL);
/** too many args */ OPTV(options4) = {"obfs2", "1", "2", "3", "4", "5" }; - tt_assert(proto_params_init(ALEN(options4), options4) == NULL) + tt_assert(proto_params_init(ALEN(options4), options4) == NULL);
/** wrong mode */ OPTV(options5) = {"obfs2", "--dest=1:1", "gladiator", "127.0.0.1:5552"}; - tt_assert(proto_params_init(ALEN(options5), options5) == NULL) + tt_assert(proto_params_init(ALEN(options5), options5) == NULL);
/** bad listen addr. */ OPTV(options6) = {"obfs2", "--dest=1:1", "server", "127.0.0.1:a"}; - tt_assert(proto_params_init(ALEN(options6), options6) == NULL) + tt_assert(proto_params_init(ALEN(options6), options6) == NULL);
/** bad dest addr. */ OPTV(options7) = {"obfs2", "--dest=1:b", "server", "127.0.0.1:1"}; - tt_assert(proto_params_init(ALEN(options7), options7) == NULL) + tt_assert(proto_params_init(ALEN(options7), options7) == NULL);
/** socks with dest. */ OPTV(options8) = {"obfs2", "--dest=1:2", "socks", "127.0.0.1:1"}; - tt_assert(proto_params_init(ALEN(options8), options8) == NULL) + tt_assert(proto_params_init(ALEN(options8), options8) == NULL);
/** socks with dest. */ OPTV(options9) = {"obfs2", "--shared-secret=a", "server", "127.0.0.1:1"}; - tt_assert(proto_params_init(ALEN(options9), options9) == NULL) + tt_assert(proto_params_init(ALEN(options9), options9) == NULL);
end: /* Unsuspend logging */