aboutsummaryrefslogtreecommitdiffstats
path: root/test/testdyn.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-04-25 11:12:10 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-04-25 11:12:10 +0000
commita2a88226488db68ca8435a72ed608bf5ec9df464 (patch)
tree1232bb7af969baa856631cc4d3e9643cdb55f667 /test/testdyn.c
parentc031b80726d1472098bb6e352eba561e3ab2e766 (diff)
downloadChibiOS-a2a88226488db68ca8435a72ed608bf5ec9df464.tar.gz
ChibiOS-a2a88226488db68ca8435a72ed608bf5ec9df464.tar.bz2
ChibiOS-a2a88226488db68ca8435a72ed608bf5ec9df464.zip
Changes to the test suite in order to save RAM on AVR targets.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@917 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/testdyn.c')
-rw-r--r--test/testdyn.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/testdyn.c b/test/testdyn.c
index 74b5fa42e..d42cbf17e 100644
--- a/test/testdyn.c
+++ b/test/testdyn.c
@@ -49,20 +49,20 @@ static void dyn1_execute(void) {
threads[2] = chThdCreateFromHeap(THD_WA_SIZE(0x10000000),
prio-3, thread, "C");
- test_assert((threads[0] != NULL) &&
- (threads[1] != NULL) &&
- (threads[2] == NULL) &&
- (threads[3] == NULL) &&
- (threads[4] == NULL),
- "#1"); /* Thread creation failed.*/
+ test_assert(1, (threads[0] != NULL) &&
+ (threads[1] != NULL) &&
+ (threads[2] == NULL) &&
+ (threads[3] == NULL) &&
+ (threads[4] == NULL),
+ "thread creation failed");
/* Claiming the memory from terminated threads. */
test_wait_threads();
- test_assert_sequence("AB");
+ test_assert_sequence(2, "AB");
/* Heap status checked again.*/
- test_assert(chHeapStatus(&n) == 1, "#2"); /* Heap fragmented.*/
- test_assert(n == sz, "#3"); /* Heap size changed.*/
+ test_assert(3, chHeapStatus(&n) == 1, "heap fragmented");
+ test_assert(4, n == sz, "heap size changed");
}
}
@@ -102,21 +102,21 @@ static void dyn2_execute(void) {
threads[3] = chThdCreateFromMemoryPool(&mp1, prio-4, thread, "D");
threads[4] = chThdCreateFromMemoryPool(&mp1, prio-5, thread, "E");
- test_assert((threads[0] != NULL) &&
- (threads[1] != NULL) &&
- (threads[2] != NULL) &&
- (threads[3] != NULL) &&
- (threads[4] == NULL),
- "#1"); /* Thread creation failed.*/
+ test_assert(1, (threads[0] != NULL) &&
+ (threads[1] != NULL) &&
+ (threads[2] != NULL) &&
+ (threads[3] != NULL) &&
+ (threads[4] == NULL),
+ "thread creation failed");
/* Claiming the memory from terminated threads. */
test_wait_threads();
- test_assert_sequence("ABCD");
+ test_assert_sequence(2, "ABCD");
/* Now the pool must be full again. */
for (i = 0; i < 4; i++)
- test_assert(chPoolAlloc(&mp1) != NULL, "#2"); /* Pool list empty.*/
- test_assert(chPoolAlloc(&mp1) == NULL, "#3"); /* Pool list not empty.*/
+ test_assert(3, chPoolAlloc(&mp1) != NULL, "pool list empty");
+ test_assert(4, chPoolAlloc(&mp1) == NULL, "pool list not empty");
}
const struct testcase testdyn2 = {