MCPcopy Create free account
hub / github.com/cpputest/cpputest / setShuffle

Method setShuffle

src/CppUTest/CommandLineArguments.cpp:226–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226bool CommandLineArguments::setShuffle(int ac, const char * const *av, int& i)
227{
228 shuffling_ = true;
229 shuffleSeed_ = (unsigned int)GetPlatformSpecificTimeInMillis();
230 if (shuffleSeed_ == 0) shuffleSeed_++;
231
232 SimpleString shuffleParameter = av[i];
233 if (shuffleParameter.size() > 2) {
234 shufflingPreSeeded_ = true;
235 shuffleSeed_ = SimpleString::AtoU(av[i] + 2);
236 } else if (i + 1 < ac) {
237 unsigned int parsedParameter = SimpleString::AtoU(av[i + 1]);
238 if (parsedParameter != 0)
239 {
240 shufflingPreSeeded_ = true;
241 shuffleSeed_ = parsedParameter;
242 i++;
243 }
244 }
245 return (shuffleSeed_ != 0);
246}
247
248SimpleString CommandLineArguments::getParameterField(int ac, const char * const *av, int& i, const SimpleString& parameterName)
249{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected