[rtems commit] PR2034: sprbtree01: predecessor/successor imprecision

gedare at rtems.org gedare at rtems.org
Sun Mar 4 13:51:07 UTC 2012


Module:    rtems
Branch:    master
Commit:    a52be5ec4044acb7fe1e28875c69c1ef031ac9fe
Changeset: http://git.rtems.org/rtems/commit/?id=a52be5ec4044acb7fe1e28875c69c1ef031ac9fe

Author:    Gedare Bloom <gedare at rtems.org>
Date:      Sun Mar  4 08:48:10 2012 -0500

PR2034: sprbtree01: predecessor/successor imprecision

The tests for the rtems_rbtree_predecessor/successor check for a
range of values for the target id of the predecessor/successor
when we know the exact expected value. This commit makes the
test more precise.

---

 testsuites/sptests/sprbtree01/init.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testsuites/sptests/sprbtree01/init.c b/testsuites/sptests/sprbtree01/init.c
index c01f3cb..38badc9 100644
--- a/testsuites/sptests/sprbtree01/init.c
+++ b/testsuites/sptests/sprbtree01/init.c
@@ -443,13 +443,13 @@ rtems_task Init(
 
   puts( "INIT - Verify rtems_rbtree_predecessor/successor");
   p = rtems_rbtree_predecessor(p);
-  if(p && rtems_rbtree_container_of(p,test_node,Node)->id > 30) {
+  if(p && rtems_rbtree_container_of(p,test_node,Node)->id != 29) {
     puts ("INIT - ERROR ON RBTREE ID MISMATCH");
     rtems_test_exit(0);
   }
   p = rtems_rbtree_find(&rbtree1, &search_node.Node);
   p = rtems_rbtree_successor(p);
-  if(p && rtems_rbtree_container_of(p,test_node,Node)->id < 30) {
+  if(p && rtems_rbtree_container_of(p,test_node,Node)->id != 31) {
     puts ("INIT - ERROR ON RBTREE ID MISMATCH");
     rtems_test_exit(0);
   }




More information about the vc mailing list