Changeset a52be5ec in rtems


Ignore:
Timestamp:
Mar 4, 2012, 1:48:10 PM (8 years ago)
Author:
Gedare Bloom <gedare@…>
Branches:
4.11, master
Children:
41d33b9
Parents:
dc1a3b9
git-author:
Gedare Bloom <gedare@…> (03/04/12 13:48:10)
git-committer:
Gedare Bloom <gedare@…> (03/04/12 13:49:28)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/sprbtree01/init.c

    rdc1a3b9 ra52be5ec  
    444444  puts( "INIT - Verify rtems_rbtree_predecessor/successor");
    445445  p = rtems_rbtree_predecessor(p);
    446   if(p && rtems_rbtree_container_of(p,test_node,Node)->id > 30) {
     446  if(p && rtems_rbtree_container_of(p,test_node,Node)->id != 29) {
    447447    puts ("INIT - ERROR ON RBTREE ID MISMATCH");
    448448    rtems_test_exit(0);
     
    450450  p = rtems_rbtree_find(&rbtree1, &search_node.Node);
    451451  p = rtems_rbtree_successor(p);
    452   if(p && rtems_rbtree_container_of(p,test_node,Node)->id < 30) {
     452  if(p && rtems_rbtree_container_of(p,test_node,Node)->id != 31) {
    453453    puts ("INIT - ERROR ON RBTREE ID MISMATCH");
    454454    rtems_test_exit(0);
Note: See TracChangeset for help on using the changeset viewer.