为IndexedList测试增加Reorder/Shrink
This commit is contained in:
parent
0ba4eb4919
commit
a192fbdca8
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
using namespace hgl;
|
using namespace hgl;
|
||||||
|
|
||||||
|
//#define TEST_REORDER
|
||||||
|
//#define TEST_SHRINK
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void out_list(const char *type,const DataArray<T> &da)
|
void out_list(const char *type,const DataArray<T> &da)
|
||||||
{
|
{
|
||||||
@ -67,5 +70,18 @@ int main(int,char **)
|
|||||||
std::cout<<"Delete "<<pos<<std::endl;
|
std::cout<<"Delete "<<pos<<std::endl;
|
||||||
il.Delete(pos);
|
il.Delete(pos);
|
||||||
out_list("delete",il);
|
out_list("delete",il);
|
||||||
|
|
||||||
|
#ifdef TEST_REORDER
|
||||||
|
if(!il.IsOrdered())
|
||||||
|
{
|
||||||
|
il.Reorder();
|
||||||
|
out_list("reorder",il);
|
||||||
|
}
|
||||||
|
#endif//TEST_REORDER
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TEST_SHRINK
|
||||||
|
il.Shrink();
|
||||||
|
out_list("shrink",il);
|
||||||
|
#endif//TEST_SHRINK
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user