MCPcopy Create free account
hub / github.com/apache/singa / GetNextRandomSeed

Function GetNextRandomSeed

test/gtest/gtest-all.cc:552–558  ·  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

550// undefined if 'seed' is invalid. The seed after kMaxRandomSeed is
551// considered to be 1.
552inline int GetNextRandomSeed(int seed) {
553 GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed)
554 << "Invalid random seed " << seed << " - must be in [1, "
555 << kMaxRandomSeed << "].";
556 const int next_seed = seed + 1;
557 return (next_seed > kMaxRandomSeed) ? 1 : next_seed;
558}
559
560// This class saves the values of all Google Test flags in its c'tor, and
561// restores them in its d'tor.

Callers 1

RunAllTestsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected