aboutsummaryrefslogtreecommitdiff
path: root/test/src/TestThread.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/TestThread.c')
-rw-r--r--test/src/TestThread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/src/TestThread.c b/test/src/TestThread.c
index e8e9ad0..f2a59c2 100644
--- a/test/src/TestThread.c
+++ b/test/src/TestThread.c
@@ -50,9 +50,11 @@ BH_UNIT_TEST(Condition)
start = time(NULL);
BH_VERIFY((condition = BH_ConditionNew()) != NULL);
BH_VERIFY((mutex = BH_MutexNew()) != NULL);
+ BH_VERIFY(BH_MutexLock(mutex) == BH_OK);
BH_VERIFY(BH_ConditionWaitFor(condition, mutex, 5000) == BH_TIMEOUT);
BH_VERIFY(BH_ConditionSignal(condition) == BH_OK);
BH_VERIFY(BH_ConditionBroadcast(condition) == BH_OK);
+ BH_VERIFY(BH_MutexUnlock(mutex) == BH_OK);
BH_VERIFY(time(NULL) - start >= 5);
BH_ConditionFree(condition);
BH_MutexFree(mutex);