Changeset 22d9575 in rtems for testsuites


Ignore:
Timestamp:
Jul 4, 2018, 2:12:14 PM (17 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
1465e70c
Parents:
0cb4257
git-author:
Sebastian Huber <sebastian.huber@…> (07/04/18 14:12:14)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/16/18 05:22:11)
Message:

linux: Add rbtree_postorder_for_each_entry_safe()

Update #3465.

File:
1 edited

Legend:

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

    r0cb4257 r22d9575  
    1414#include <rtems/rbtree.h>
    1515#include <rtems/score/rbtreeimpl.h>
     16
     17#include <linux/rbtree.h>
    1618
    1719const char rtems_test_name[] = "SPRBTREE 1";
     
    19101912{
    19111913  test_node *node;
     1914  test_node *next;
    19121915  size_t i;
    19131916
     
    19201923
    19211924  rtems_test_assert( node == NULL );
     1925
     1926  i = 0;
     1927  next = NULL;
     1928
     1929  rbtree_postorder_for_each_entry_safe( node, next, tree, Node ) {
     1930    rtems_test_assert( node == &node_array[ i ] );
     1931
     1932    if ( i < pt->node_count - 1 ) {
     1933      rtems_test_assert( next == &node_array[ i + 1 ] );
     1934    } else {
     1935      rtems_test_assert( next == NULL );
     1936    }
     1937
     1938    ++i;
     1939  }
     1940
     1941  rtems_test_assert( i == pt->node_count );
     1942  rtems_test_assert( node == NULL );
     1943  rtems_test_assert( next == NULL );
    19221944}
    19231945
Note: See TracChangeset for help on using the changeset viewer.