diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2017-03-14 01:10:07 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2017-03-14 13:45:14 +1100 |
commit | 8884b7247d094cd11ff9e39c325ba928c5bdbc6c (patch) | |
tree | a5a44e1f3836354ca82e78ec8ab83983f563f35f /regress/unittests/test_helper/test_helper.c | |
parent | c6774d21185220c0ba11e8fd204bf0ad1a432071 (diff) |
upstream commit
Add ASSERT_LONG_* helpers.
Upstream-Regress-ID: fe15beaea8f5063c7f21b0660c722648e3d76431
Diffstat (limited to 'regress/unittests/test_helper/test_helper.c')
-rw-r--r-- | regress/unittests/test_helper/test_helper.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/regress/unittests/test_helper/test_helper.c b/regress/unittests/test_helper/test_helper.c index 26ca26b5e..f855137fb 100644 --- a/regress/unittests/test_helper/test_helper.c +++ b/regress/unittests/test_helper/test_helper.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: test_helper.c,v 1.6 2015/03/03 20:42:49 djm Exp $ */ | 1 | /* $OpenBSD: test_helper.c,v 1.7 2017/03/14 01:10:07 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2011 Damien Miller <djm@mindrot.org> | 3 | * Copyright (c) 2011 Damien Miller <djm@mindrot.org> |
4 | * | 4 | * |
@@ -442,6 +442,17 @@ assert_u_int(const char *file, int line, const char *a1, const char *a2, | |||
442 | } | 442 | } |
443 | 443 | ||
444 | void | 444 | void |
445 | assert_long(const char *file, int line, const char *a1, const char *a2, | ||
446 | long aa1, long aa2, enum test_predicate pred) | ||
447 | { | ||
448 | TEST_CHECK(aa1, aa2, pred); | ||
449 | test_header(file, line, a1, a2, "LONG", pred); | ||
450 | fprintf(stderr, "%12s = %ld / 0x%lx\n", a1, aa1, aa1); | ||
451 | fprintf(stderr, "%12s = %ld / 0x%lx\n", a2, aa2, aa2); | ||
452 | test_die(); | ||
453 | } | ||
454 | |||
455 | void | ||
445 | assert_long_long(const char *file, int line, const char *a1, const char *a2, | 456 | assert_long_long(const char *file, int line, const char *a1, const char *a2, |
446 | long long aa1, long long aa2, enum test_predicate pred) | 457 | long long aa1, long long aa2, enum test_predicate pred) |
447 | { | 458 | { |