Skip to content

Commit

Permalink
tests: make NUTS_PASS use TEST_ASSERT
Browse files Browse the repository at this point in the history
This will ensure that we fast fail if a test cannot complete,
rather than muddling on and reporting failures elsewhere.
  • Loading branch information
gdamore committed Jan 4, 2025
1 parent e3f1d08 commit bcbe62d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/testing/nuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ extern const char *nuts_ecdsa_client_crt;
#define NUTS_PASS(cond) \
do { \
int result_ = (cond); \
TEST_CHECK_(result_ == 0, "%s succeeds", #cond); \
TEST_ASSERT(result_ == 0); \
TEST_MSG("%s: expected success, got %s (%d)", #cond, \
nng_strerror(result_), result_); \
} while (0)
Expand Down

0 comments on commit bcbe62d

Please sign in to comment.