Test_ObjectInfo_CUAssert_GrpLink( p_objinfo, i_cnt, p_objparent->i_id, NO_OBJ, NO_OBJ, NO_OBJ );
Test_ObjectInfo_CUAssert_GrpLink( p_objparent, (i_cnt - 1), (i_cnt - 2), i_cnt, NO_OBJ, NO_OBJ );
}
-/*
+
for( ; i_cnt < 10; i_cnt++ ) {
qw_addr += 0x00010000;
qw_size >>= 1;
p_objinfo = OBJINFO( p_pginfo, 0 );
ObjectInfo_DeleteObjectInfo( p_pginfo, p_objinfo );
CU_ASSERT( NO_OBJ == p_pginfo->objinfo.i_topid );
-*/
+
return;
}
// ID03: 40000000h-80000000h
// ID07: 60000000h-70000000h
// ID02: 80000000h-c0000000h
- // ID09: 80000000h-a0000000h
+ // ID09: 80000000h-a0000000h
// Scenery 1 ......................................................
// Alloc ---
LibGoblin_ObjectInfo *p_objparent;
LibGoblin_ObjectInfo *p_objmaster;
- // ID01: 00000000h-40000000h
- // ID04: 20000000h-30000000h
- // ID10: 21000000h-25000000h
- // ID11: 25000000h-29000000h
- // ID05: 30000000h-40000000h
- // ID12: 38000000h-40000000h
- // ID13: 40000000h-44000000h
- // ID08: 70000000h-80000000h
- // ID06: 38000000h-58000000h
- // ID14: 80000000h-88000000h
- // ID15: 84000000h-8c000000h
- // ID03: 40000000h-80000000h
- // ID07: 60000000h-70000000h
- // ID02: 80000000h-c0000000h
- // ID09: 80000000h-a0000000h
-
// Scenery 1 ......................................................
Test_ObjectInfo_InsetDelete_test00_004_Alloc( p_pginfo );
+ // Delete 1
p_objinfo = OBJINFO( p_pginfo, 5 );
ObjectInfo_DeleteObjectInfo( p_pginfo, p_objinfo );
-/*
+ p_objinfo = OBJINFO( p_pginfo, 11 );
+ CU_ASSERT( p_objinfo->addrlink.i_next_id == 6 );
+ CU_ASSERT( p_objinfo->grplink.i_next_id == NO_OBJ );
+ p_objinfo = OBJINFO( p_pginfo, 6 );
+ CU_ASSERT( p_objinfo->addrlink.i_prev_id == 11 );
+ p_objinfo = OBJINFO( p_pginfo, 4 );
+ CU_ASSERT( p_objinfo->grplink.i_next_id == 8 );
+ p_objinfo = OBJINFO( p_pginfo, 8 );
+ CU_ASSERT( p_objinfo->grplink.i_prev_id == 4 );
+
+ // Delete 2
+ p_objinfo = OBJINFO( p_pginfo, 6 );
+ ObjectInfo_DeleteObjectInfo( p_pginfo, p_objinfo );
+
+ p_objinfo = OBJINFO( p_pginfo, 11 );
+ CU_ASSERT( p_objinfo->addrlink.i_next_id == 3 );
+ p_objinfo = OBJINFO( p_pginfo, 3 );
+ CU_ASSERT( p_objinfo->addrlink.i_prev_id == 11 );
+ p_objinfo = OBJINFO( p_pginfo, 1 );
+ CU_ASSERT( p_objinfo->grplink.i_next_id == 3 );
+ p_objinfo = OBJINFO( p_pginfo, 3 );
+ CU_ASSERT( p_objinfo->grplink.i_prev_id == 1 );
+
+ // Delete 3
+ p_objinfo = OBJINFO( p_pginfo, 1 );
+ ObjectInfo_DeleteObjectInfo( p_pginfo, p_objinfo );
+
+ p_objinfo = OBJINFO( p_pginfo, 3 );
+ CU_ASSERT( p_objinfo->addrlink.i_prev_id == 0 );
+ CU_ASSERT( p_objinfo->addrlink.i_next_id == 7 );
+ CU_ASSERT( p_objinfo->grplink.i_prev_id == NO_OBJ );
+ CU_ASSERT( p_objinfo->grplink.i_next_id == 2 );
+ p_objinfo = OBJINFO( p_pginfo, 7 );
+ CU_ASSERT( p_objinfo->addrlink.i_prev_id == 3 );
+ p_objinfo = OBJINFO( p_pginfo, 2 );
+ CU_ASSERT( p_objinfo->grplink.i_prev_id == 3 );
+ p_objinfo = OBJINFO( p_pginfo, 0 );
+ CU_ASSERT( p_objinfo->grplink.i_child_topid == 3 );
+
+ // Delete 4
+ p_objinfo = OBJINFO( p_pginfo, 2 );
+ ObjectInfo_DeleteObjectInfo( p_pginfo, p_objinfo );
+
+ p_objinfo = OBJINFO( p_pginfo, 3 );
+ CU_ASSERT( p_objinfo->grplink.i_next_id == 9 );
+ CU_ASSERT( p_objinfo->addrlink.i_next_id == 7 );
+
+ p_objinfo = OBJINFO( p_pginfo, 3 );
+ ObjectInfo_DeleteObjectInfo( p_pginfo, p_objinfo );
+
+ p_objinfo = OBJINFO( p_pginfo, 9 );
+ CU_ASSERT( p_objinfo->addrlink.i_prev_id == 0 );
+ CU_ASSERT( p_objinfo->addrlink.i_next_id == NO_OBJ );
+ CU_ASSERT( p_objinfo->grplink.i_prev_id == NO_OBJ );
+ CU_ASSERT( p_objinfo->grplink.i_next_id == NO_OBJ );
+
+ p_objinfo = OBJINFO( p_pginfo, 9 );
+ ObjectInfo_DeleteObjectInfo( p_pginfo, p_objinfo );
+
+ p_objinfo = OBJINFO( p_pginfo, 0 );
+ CU_ASSERT( p_objinfo->grplink.i_child_topid == NO_OBJ);
+ CU_ASSERT( p_objinfo->addrlink.i_prev_id == NO_OBJ );
+ CU_ASSERT( p_objinfo->addrlink.i_next_id == NO_OBJ );
+ CU_ASSERT( p_objinfo->grplink.i_prev_id == NO_OBJ );
+ CU_ASSERT( p_objinfo->grplink.i_next_id == NO_OBJ );
+
// Delete MasterObject
p_objinfo = OBJINFO( p_pginfo, 0 );
- ObjectInfo_DeleteObjectInfo( p_pginfo, p_objinfo, 0x00 );
+ ObjectInfo_DeleteObjectInfo( p_pginfo, p_objinfo );
CU_ASSERT( NO_OBJ == p_pginfo->objinfo.i_topid );
-*/
+
return;
}