From 7d414c33ae972ceb2b73b52f47e4bc462f0c8e0b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 18 Aug 2009 15:32:49 +0000 Subject: 2009-08-18 Joel Sherrill * spobjgetnext/init.c, spobjgetnext/spobjgetnext.scn: Add error cases for various null parameters. --- testsuites/sptests/spobjgetnext/init.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'testsuites/sptests/spobjgetnext/init.c') diff --git a/testsuites/sptests/spobjgetnext/init.c b/testsuites/sptests/spobjgetnext/init.c index eaabffcf65..39535a6fc5 100644 --- a/testsuites/sptests/spobjgetnext/init.c +++ b/testsuites/sptests/spobjgetnext/init.c @@ -63,20 +63,37 @@ rtems_task Init( rtems_status_code status; rtems_id main_task; int count; + Objects_Control *o; + Objects_Locations location; + Objects_Id id; + Objects_Information *info; puts( "\n\n*** TEST OBJECT GET NEXT ***" ); + info = &_RTEMS_tasks_Information; main_task = rtems_task_self(); + puts( "Init - _Objects_Get_next - NULL object information" ); + o = _Objects_Get_next( NULL, main_task, &location, &id ); + assert( o == NULL ); + + puts( "Init - _Objects_Get_next - NULL location" ); + o = _Objects_Get_next( info, main_task, NULL, &id ); + assert( o == NULL ); + + puts( "Init - _Objects_Get_next - NULL id" ); + o = _Objects_Get_next( info, main_task, &location, NULL ); + assert( o == NULL ); + /* XXX push the three NULL error cases */ /* simple case of only all tasks in the system, starting at initial */ - count = scan_objects( &_RTEMS_tasks_Information, OBJECTS_ID_INITIAL_INDEX ); + count = scan_objects( info, OBJECTS_ID_INITIAL_INDEX ); printf( "%d RTEMS Task%s\n", count, ((count == 1) ? "" : "s") ); assert( count == 1 ); /* simple case of only 1 task in the system, starting at that task */ - count = scan_objects( &_RTEMS_tasks_Information, main_task ); + count = scan_objects( info, main_task ); printf( "%d RTEMS Task%s\n", count, ((count == 1) ? "" : "s") ); assert( count == 1 ); -- cgit v1.2.3