diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-17 11:52:50 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-17 11:52:50 +0000 |
commit | 155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1 (patch) | |
tree | cb27035ab0b6a7c157f992d9edb6a2c7c5d669e9 /test/testmbox.c | |
parent | 120b97e07051b35a67be2a173b51b7edc2a0ae19 (diff) | |
download | ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.tar.gz ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.tar.bz2 ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6169 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/testmbox.c')
-rw-r--r-- | test/testmbox.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/test/testmbox.c b/test/testmbox.c index 1ca34dadc..a9f57e961 100644 --- a/test/testmbox.c +++ b/test/testmbox.c @@ -87,26 +87,26 @@ static void mbox1_execute(void) { */
for (i = 0; i < MB_SIZE - 1; i++) {
msg1 = chMBPost(&mb1, 'B' + i, TIME_INFINITE);
- test_assert(2, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(2, msg1 == MSG_OK, "wrong wake-up message");
}
msg1 = chMBPostAhead(&mb1, 'A', TIME_INFINITE);
- test_assert(3, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(3, msg1 == MSG_OK, "wrong wake-up message");
/*
* Testing post timeout.
*/
msg1 = chMBPost(&mb1, 'X', 1);
- test_assert(4, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(4, msg1 == MSG_TIMEOUT, "wrong wake-up message");
chSysLock();
msg1 = chMBPostI(&mb1, 'X');
chSysUnlock();
- test_assert(5, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(5, msg1 == MSG_TIMEOUT, "wrong wake-up message");
msg1 = chMBPostAhead(&mb1, 'X', 1);
- test_assert(6, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(6, msg1 == MSG_TIMEOUT, "wrong wake-up message");
chSysLock();
msg1 = chMBPostAheadI(&mb1, 'X');
chSysUnlock();
- test_assert(7, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(7, msg1 == MSG_TIMEOUT, "wrong wake-up message");
/*
* Testing final conditions.
@@ -120,7 +120,7 @@ static void mbox1_execute(void) { */
for (i = 0; i < MB_SIZE; i++) {
msg1 = chMBFetch(&mb1, &msg2, TIME_INFINITE);
- test_assert(11, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(11, msg1 == MSG_OK, "wrong wake-up message");
test_emit_token(msg2);
}
test_assert_sequence(12, "ABCDE");
@@ -129,9 +129,9 @@ static void mbox1_execute(void) { * Testing buffer circularity.
*/
msg1 = chMBPost(&mb1, 'B' + i, TIME_INFINITE);
- test_assert(13, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(13, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBFetch(&mb1, &msg2, TIME_INFINITE);
- test_assert(14, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(14, msg1 == MSG_OK, "wrong wake-up message");
test_assert(15, mb1.mb_buffer == mb1.mb_wrptr, "write pointer not aligned to base");
test_assert(16, mb1.mb_buffer == mb1.mb_rdptr, "read pointer not aligned to base");
@@ -139,11 +139,11 @@ static void mbox1_execute(void) { * Testing fetch timeout.
*/
msg1 = chMBFetch(&mb1, &msg2, 1);
- test_assert(17, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(17, msg1 == MSG_TIMEOUT, "wrong wake-up message");
chSysLock();
msg1 = chMBFetchI(&mb1, &msg2);
chSysUnlock();
- test_assert(18, msg1 == RDY_TIMEOUT, "wrong wake-up message");
+ test_assert(18, msg1 == MSG_TIMEOUT, "wrong wake-up message");
/*
* Testing final conditions.
@@ -157,22 +157,22 @@ static void mbox1_execute(void) { */
chSysLock();
msg1 = chMBPostI(&mb1, 'A');
- test_assert(22, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(22, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostI(&mb1, 'B');
- test_assert(23, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(23, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostI(&mb1, 'C');
- test_assert(24, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(24, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostI(&mb1, 'D');
- test_assert(25, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(25, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostI(&mb1, 'E');
chSysUnlock();
- test_assert(26, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(26, msg1 == MSG_OK, "wrong wake-up message");
test_assert(27, mb1.mb_rdptr == mb1.mb_wrptr, "pointers not aligned");
for (i = 0; i < MB_SIZE; i++) {
chSysLock();
msg1 = chMBFetchI(&mb1, &msg2);
chSysUnlock();
- test_assert(28, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(28, msg1 == MSG_OK, "wrong wake-up message");
test_emit_token(msg2);
}
test_assert_sequence(29, "ABCDE");
@@ -182,22 +182,22 @@ static void mbox1_execute(void) { chSysLock();
msg1 = chMBPostAheadI(&mb1, 'E');
- test_assert(33, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(33, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostAheadI(&mb1, 'D');
- test_assert(34, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(34, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostAheadI(&mb1, 'C');
- test_assert(35, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(35, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostAheadI(&mb1, 'B');
- test_assert(36, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(36, msg1 == MSG_OK, "wrong wake-up message");
msg1 = chMBPostAheadI(&mb1, 'A');
chSysUnlock();
- test_assert(37, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(37, msg1 == MSG_OK, "wrong wake-up message");
test_assert(38, mb1.mb_rdptr == mb1.mb_wrptr, "pointers not aligned");
for (i = 0; i < MB_SIZE; i++) {
chSysLock();
msg1 = chMBFetchI(&mb1, &msg2);
chSysUnlock();
- test_assert(39, msg1 == RDY_OK, "wrong wake-up message");
+ test_assert(39, msg1 == MSG_OK, "wrong wake-up message");
test_emit_token(msg2);
}
test_assert_sequence(40, "ABCDE");
|