fix tests

pull/5158/head
YarivCol 2017-10-05 07:41:47 -07:00
parent f403623ba5
commit e0a0615038
2 changed files with 11 additions and 13 deletions

View File

@ -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);

View File

@ -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)