static void GenericRemoveTest(ValueStrategy strategy, int32 maxNumber) { typedef typename ValueStrategy::Value Value; TestVector<Value> v; GenericFill(v, strategy, maxNumber); while (v.Count() > 0) { int32 index = rand() % (v.Count()); Value value = v[index]; v.Remove(value); v.Remove(value); } }
static void GenericPushPopBackTest(ValueStrategy strategy, int32 maxNumber) { typedef typename ValueStrategy::Value Value; TestVector<Value> v; for (int32 i = 0; i < maxNumber; i++) v.PushBack(strategy.Generate()); for (int32 i = 0; i < maxNumber / 2; i++) v.PopBack(); for (int32 i = 0; i < maxNumber; i++) v.PushBack(strategy.Generate()); int32 count = v.Count(); for (int32 i = 0; i < count; i++) v.PopBack(); }