From 07351222e6d0b6b3dcd4f50ecb18bc09e7402d1c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 21 Sep 2010 10:22:06 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2184 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/testevt.c | 10 +++++----- test/testmbox.c | 14 +++++++------- test/testqueues.c | 24 ++++++++++++------------ 3 files changed, 24 insertions(+), 24 deletions(-) (limited to 'test') diff --git a/test/testevt.c b/test/testevt.c index 079257ac5..656a8430d 100644 --- a/test/testevt.c +++ b/test/testevt.c @@ -94,11 +94,11 @@ static void evt1_execute(void) { chEvtInit(&es1); chEvtRegisterMask(&es1, &el1, 1); chEvtRegisterMask(&es1, &el2, 2); - test_assert(1, chEvtIsListening(&es1), "no listener"); + test_assert(1, chEvtIsListeningI(&es1), "no listener"); chEvtUnregister(&es1, &el1); - test_assert(2, chEvtIsListening(&es1), "no listener"); + test_assert(2, chEvtIsListeningI(&es1), "no listener"); chEvtUnregister(&es1, &el2); - test_assert(3, !chEvtIsListening(&es1), "stuck listener"); + test_assert(3, !chEvtIsListeningI(&es1), "stuck listener"); /* * Testing chEvtDispatch(). @@ -220,8 +220,8 @@ static void evt2_execute(void) { test_wait_threads(); chEvtUnregister(&es1, &el1); chEvtUnregister(&es2, &el2); - test_assert(14, !chEvtIsListening(&es1), "stuck listener"); - test_assert(15, !chEvtIsListening(&es2), "stuck listener"); + test_assert(14, !chEvtIsListeningI(&es1), "stuck listener"); + test_assert(15, !chEvtIsListeningI(&es2), "stuck listener"); } ROMCONST struct testcase testevt2 = { diff --git a/test/testmbox.c b/test/testmbox.c index 33706b5f5..60fa5cb44 100644 --- a/test/testmbox.c +++ b/test/testmbox.c @@ -83,7 +83,7 @@ static void mbox1_execute(void) { /* * Testing initial space. */ - test_assert(1, chMBGetEmpty(&mb1) == MB_SIZE, "wrong size"); + test_assert(1, chMBGetEmptyI(&mb1) == MB_SIZE, "wrong size"); /* * Testing enqueuing and backward circularity. @@ -104,8 +104,8 @@ static void mbox1_execute(void) { /* * Testing final conditions. */ - test_assert(5, chMBGetEmpty(&mb1) == 0, "still empty"); - test_assert(6, chMBGetFull(&mb1) == MB_SIZE, "not full"); + test_assert(5, chMBGetEmptyI(&mb1) == 0, "still empty"); + test_assert(6, chMBGetFullI(&mb1) == MB_SIZE, "not full"); test_assert(7, mb1.mb_rdptr == mb1.mb_wrptr, "pointers not aligned"); /* @@ -137,8 +137,8 @@ static void mbox1_execute(void) { /* * Testing final conditions. */ - test_assert(15, chMBGetEmpty(&mb1) == MB_SIZE, "not empty"); - test_assert(16, chMBGetFull(&mb1) == 0, "still full"); + test_assert(15, chMBGetEmptyI(&mb1) == MB_SIZE, "not empty"); + test_assert(16, chMBGetFullI(&mb1) == 0, "still full"); test_assert(17, mb1.mb_rdptr == mb1.mb_wrptr, "pointers not aligned"); /* @@ -149,8 +149,8 @@ static void mbox1_execute(void) { /* * Re-testing final conditions. */ - test_assert(18, chMBGetEmpty(&mb1) == MB_SIZE, "not empty"); - test_assert(19, chMBGetFull(&mb1) == 0, "still full"); + test_assert(18, chMBGetEmptyI(&mb1) == MB_SIZE, "not empty"); + test_assert(19, chMBGetFullI(&mb1) == 0, "still full"); test_assert(20, mb1.mb_buffer == mb1.mb_wrptr, "write pointer not aligned to base"); test_assert(21, mb1.mb_buffer == mb1.mb_rdptr, "read pointer not aligned to base"); } diff --git a/test/testqueues.c b/test/testqueues.c index a9895a29a..27f533142 100644 --- a/test/testqueues.c +++ b/test/testqueues.c @@ -86,18 +86,18 @@ static void queues1_execute(void) { size_t n; /* Initial empty state */ - test_assert(1, chIQIsEmpty(&iq), "not empty"); + test_assert(1, chIQIsEmptyI(&iq), "not empty"); /* Queue filling */ for (i = 0; i < TEST_QUEUES_SIZE; i++) chIQPutI(&iq, 'A' + i); - test_assert(2, chIQIsFull(&iq), "still has space"); + test_assert(2, chIQIsFullI(&iq), "still has space"); test_assert(3, chIQPutI(&iq, 0) == Q_FULL, "failed to report Q_FULL"); /* Queue emptying */ for (i = 0; i < TEST_QUEUES_SIZE; i++) test_emit_token(chIQGet(&iq)); - test_assert(4, chIQIsEmpty(&iq), "still full"); + test_assert(4, chIQIsEmptyI(&iq), "still full"); test_assert_sequence(5, "ABCD"); /* Queue filling again */ @@ -107,7 +107,7 @@ static void queues1_execute(void) { /* Reading the whole thing */ n = chIQReadTimeout(&iq, wa[1], TEST_QUEUES_SIZE * 2, TIME_IMMEDIATE); test_assert(6, n == TEST_QUEUES_SIZE, "wrong returned size"); - test_assert(7, chIQIsEmpty(&iq), "still full"); + test_assert(7, chIQIsEmptyI(&iq), "still full"); /* Queue filling again */ for (i = 0; i < TEST_QUEUES_SIZE; i++) @@ -118,12 +118,12 @@ static void queues1_execute(void) { test_assert(8, n == TEST_QUEUES_SIZE / 2, "wrong returned size"); n = chIQReadTimeout(&iq, wa[1], TEST_QUEUES_SIZE / 2, TIME_IMMEDIATE); test_assert(9, n == TEST_QUEUES_SIZE / 2, "wrong returned size"); - test_assert(10, chIQIsEmpty(&iq), "still full"); + test_assert(10, chIQIsEmptyI(&iq), "still full"); /* Testing reset */ chIQPutI(&iq, 0); chIQResetI(&iq); - test_assert(11, chIQIsEmpty(&iq), "still full"); + test_assert(11, chIQIsEmptyI(&iq), "still full"); /* Timeout */ test_assert(12, chIQGetTimeout(&iq, 10) == Q_TIMEOUT, "wrong timeout return"); @@ -155,35 +155,35 @@ static void queues2_execute(void) { size_t n; /* Initial empty state */ - test_assert(1, chOQIsEmpty(&oq), "not empty"); + test_assert(1, chOQIsEmptyI(&oq), "not empty"); /* Queue filling */ for (i = 0; i < TEST_QUEUES_SIZE; i++) chOQPut(&oq, 'A' + i); - test_assert(2, chOQIsFull(&oq), "still has space"); + test_assert(2, chOQIsFullI(&oq), "still has space"); /* Queue emptying */ for (i = 0; i < TEST_QUEUES_SIZE; i++) test_emit_token(chOQGetI(&oq)); - test_assert(3, chOQIsEmpty(&oq), "still full"); + test_assert(3, chOQIsEmptyI(&oq), "still full"); test_assert_sequence(4, "ABCD"); test_assert(5, chOQGetI(&oq) == Q_EMPTY, "failed to report Q_EMPTY"); /* Writing the whole thing */ n = chOQWriteTimeout(&oq, wa[1], TEST_QUEUES_SIZE * 2, TIME_IMMEDIATE); test_assert(6, n == TEST_QUEUES_SIZE, "wrong returned size"); - test_assert(7, chOQIsFull(&oq), "not full"); + test_assert(7, chOQIsFullI(&oq), "not full"); /* Testing reset */ chOQResetI(&oq); - test_assert(8, chOQIsEmpty(&oq), "still full"); + test_assert(8, chOQIsEmptyI(&oq), "still full"); /* Partial writes */ n = chOQWriteTimeout(&oq, wa[1], TEST_QUEUES_SIZE / 2, TIME_IMMEDIATE); test_assert(9, n == TEST_QUEUES_SIZE / 2, "wrong returned size"); n = chOQWriteTimeout(&oq, wa[1], TEST_QUEUES_SIZE / 2, TIME_IMMEDIATE); test_assert(10, n == TEST_QUEUES_SIZE / 2, "wrong returned size"); - test_assert(11, chOQIsFull(&oq), "not full"); + test_assert(11, chOQIsFullI(&oq), "not full"); /* Timeout */ test_assert(12, chOQPutTimeout(&oq, 0, 10) == Q_TIMEOUT, "wrong timeout return"); -- cgit v1.2.3