aboutsummaryrefslogtreecommitdiff
path: root/src/core/errors_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/errors_test.c')
-rw-r--r--src/core/errors_test.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/core/errors_test.c b/src/core/errors_test.c
index 4e50467c..52d820fe 100644
--- a/src/core/errors_test.c
+++ b/src/core/errors_test.c
@@ -10,35 +10,31 @@
#include <errno.h>
#include <string.h>
-#include <nng/nng.h>
-
-#include <acutest.h>
-#include <testutil.h>
+#include <nuts.h>
static void
test_known_errors(void)
{
-
- TEST_STREQUAL(nng_strerror(NNG_ECLOSED), "Object closed");
- TEST_STREQUAL(nng_strerror(NNG_ETIMEDOUT), "Timed out");
+ NUTS_MATCH(nng_strerror(NNG_ECLOSED), "Object closed");
+ NUTS_MATCH(nng_strerror(NNG_ETIMEDOUT), "Timed out");
}
static void
test_unknown_errors(void)
{
for (unsigned i = 1; i < 0x1000000; i = i * 2 + 100) {
- TEST_CHECK(nng_strerror(i) != NULL);
+ NUTS_TRUE(nng_strerror(i) != NULL);
}
}
static void
test_system_errors(void)
{
- TEST_STREQUAL(nng_strerror(NNG_ESYSERR + ENOENT), strerror(ENOENT));
- TEST_STREQUAL(nng_strerror(NNG_ESYSERR + EINVAL), strerror(EINVAL));
+ NUTS_MATCH(nng_strerror(NNG_ESYSERR + ENOENT), strerror(ENOENT));
+ NUTS_MATCH(nng_strerror(NNG_ESYSERR + EINVAL), strerror(EINVAL));
}
-TEST_LIST = {
+NUTS_TESTS = {
{ "known errors", test_known_errors },
{ "unknown errors", test_unknown_errors },
{ "system errors", test_system_errors },