mirror of https://github.com/ARMmbed/mbed-os.git
fix tests
parent
f403623ba5
commit
e0a0615038
|
@ -464,13 +464,13 @@ void test_mail_empty()
|
|||
{
|
||||
Mail<mail_t, 1> m;
|
||||
|
||||
mail_t *mail = m->alloc();
|
||||
mail_t *mail = m.alloc();
|
||||
|
||||
TEST_ASSERT_EQUAL(true, m.empty());
|
||||
|
||||
m.put(mail);
|
||||
|
||||
TEST_ASSERT_EQUAL(false, m.empty()));
|
||||
TEST_ASSERT_EQUAL(false, m.empty());
|
||||
}
|
||||
|
||||
/** Test mail empty
|
||||
|
@ -483,13 +483,13 @@ void test_mail_full()
|
|||
{
|
||||
Mail<mail_t, 1> m;
|
||||
|
||||
mail_t *mail = m->alloc();
|
||||
mail_t *mail = m.alloc();
|
||||
|
||||
TEST_ASSERT_EQUAL(false, m.full());
|
||||
|
||||
m.put(mail);
|
||||
|
||||
TEST_ASSERT_EQUAL(true, m.full()));
|
||||
TEST_ASSERT_EQUAL(true, m.full());
|
||||
}
|
||||
|
||||
utest::v1::status_t test_setup(const size_t number_of_cases)
|
||||
|
@ -512,7 +512,9 @@ Case cases[] = {
|
|||
Case("Test invalid message free", test_free_wrong),
|
||||
Case("Test message send/receive single thread and order", test_single_thread_order),
|
||||
Case("Test message send/receive multi-thread and per thread order", test_multi_thread_order),
|
||||
Case("Test message send/receive multi-thread, multi-Mail and per thread order", test_multi_thread_multi_mail_order)
|
||||
Case("Test message send/receive multi-thread, multi-Mail and per thread order", test_multi_thread_multi_mail_order),
|
||||
Case("Test mail empty", test_mail_empty),
|
||||
Case("Test mail full", test_mail_full)
|
||||
};
|
||||
|
||||
Specification specification(test_setup, cases);
|
||||
|
|
|
@ -290,11 +290,9 @@ void test_queue_empty()
|
|||
|
||||
TEST_ASSERT_EQUAL(true, q.empty());
|
||||
|
||||
stat = q.put((uint32_t*) TEST_UINT_MSG, TEST_TIMEOUT, 1);
|
||||
q.put((uint32_t*) TEST_UINT_MSG, TEST_TIMEOUT, 1);
|
||||
|
||||
TEST_ASSERT_EQUAL(osOK, stat);
|
||||
|
||||
TEST_ASSERT_EQUAL(false, q.empty()));
|
||||
TEST_ASSERT_EQUAL(false, q.empty());
|
||||
}
|
||||
|
||||
/** Test queue empty
|
||||
|
@ -309,11 +307,9 @@ void test_queue_full()
|
|||
|
||||
TEST_ASSERT_EQUAL(false, q.full());
|
||||
|
||||
stat = q.put((uint32_t*) TEST_UINT_MSG, TEST_TIMEOUT, 1);
|
||||
q.put((uint32_t*) TEST_UINT_MSG, TEST_TIMEOUT, 1);
|
||||
|
||||
TEST_ASSERT_EQUAL(osOK, stat);
|
||||
|
||||
TEST_ASSERT_EQUAL(true, q.full()));
|
||||
TEST_ASSERT_EQUAL(true, q.full());
|
||||
}
|
||||
|
||||
utest::v1::status_t test_setup(const size_t number_of_cases)
|
||||
|
|
Loading…
Reference in New Issue