示例#1
0
static
void
GenericInsertTest2(ValueStrategy strategy, int32 maxNumber)
{
	typedef typename ValueStrategy::Value Value;
	TestVector<Value> v;
	for (int32 i = 0; i < maxNumber; i++) {
		int32 index = rand() % (i + 1);
		v.Insert(strategy.Generate(), v.IteratorForIndex(index));
	}
}
示例#2
0
static
void
GenericEraseTest2(ValueStrategy strategy, int32 maxNumber)
{
	typedef typename ValueStrategy::Value Value;
	TestVector<Value> v;
	GenericFill(v, strategy, maxNumber);
	for (int32 i = maxNumber - 1; i >= 0; i--) {
		int32 index = rand() % (i + 1);
		v.Erase(v.IteratorForIndex(index));
	}
}