summaryrefslogtreecommitdiff
path: root/tests/condvar1.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/condvar1.c')
-rw-r--r--tests/condvar1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/condvar1.c b/tests/condvar1.c
index 97c870b..daa0f42 100644
--- a/tests/condvar1.c
+++ b/tests/condvar1.c
@@ -46,14 +46,20 @@
#include "test.h"
-pthread_cond_t cv;
+static pthread_cond_t cv = NULL;
int
main()
{
+ assert(cv == NULL);
+
assert(pthread_cond_init(&cv, NULL) == 0);
+ assert(cv != NULL);
+
assert(pthread_cond_destroy(&cv) == 0);
+ assert(cv == NULL);
+
return 0;
}