MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / GetNextRandomSeed

Function GetNextRandomSeed

tests/gtest/gtest-all.cc:538–544  ·  view source on GitHub ↗

Returns the first valid random seed after 'seed'. The behavior is undefined if 'seed' is invalid. The seed after kMaxRandomSeed is considered to be 1.

Source from the content-addressed store, hash-verified

536// undefined if 'seed' is invalid. The seed after kMaxRandomSeed is
537// considered to be 1.
538inline int GetNextRandomSeed(int seed) {
539 GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed)
540 << "Invalid random seed " << seed << " - must be in [1, "
541 << kMaxRandomSeed << "].";
542 const int next_seed = seed + 1;
543 return (next_seed > kMaxRandomSeed) ? 1 : next_seed;
544}
545
546// This class saves the values of all Google Test flags in its c'tor, and
547// restores them in its d'tor.

Callers 1

RunAllTestsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected