From 7cd6a5437c263a4e2b64bafdf780d60ce51f941f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 1 Sep 2022 23:14:03 -0400 Subject: Simplify thread and semaphore status codes --- test/test_sem.c | 4 ++-- test/test_status.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test_sem.c b/test/test_sem.c index f2b2794..36d01c5 100644 --- a/test/test_sem.c +++ b/test/test_sem.c @@ -45,10 +45,10 @@ static void test_try_wait(void) { assert(!zix_sem_init(&sem, 0)); - assert(zix_sem_try_wait(&sem) == ZIX_STATUS_TIMEOUT); + assert(zix_sem_try_wait(&sem) == ZIX_STATUS_UNAVAILABLE); assert(!zix_sem_post(&sem)); assert(!zix_sem_try_wait(&sem)); - assert(zix_sem_try_wait(&sem) == ZIX_STATUS_TIMEOUT); + assert(zix_sem_try_wait(&sem) == ZIX_STATUS_UNAVAILABLE); assert(!zix_sem_destroy(&sem)); } diff --git a/test/test_status.c b/test/test_status.c index 298b520..1a76ac2 100644 --- a/test/test_status.c +++ b/test/test_status.c @@ -37,7 +37,7 @@ test_strerror(void) const char* msg = zix_strerror(ZIX_STATUS_SUCCESS); assert(!strcmp(msg, "Success")); - for (int i = ZIX_STATUS_ERROR; i <= ZIX_STATUS_NOT_SUPPORTED; ++i) { + for (int i = ZIX_STATUS_ERROR; i <= ZIX_STATUS_UNAVAILABLE; ++i) { msg = zix_strerror((ZixStatus)i); assert(strcmp(msg, "Success")); } -- cgit v1.2.1