CHROMA
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
testing::internal::Random Class Reference

#include <gtest.h>

Public Member Functions

 Random (UInt32 seed)
 
void Reseed (UInt32 seed)
 
UInt32 Generate (UInt32 range)
 

Static Public Attributes

static const UInt32 kMaxRange = 1u << 31
 

Private Member Functions

 GTEST_DISALLOW_COPY_AND_ASSIGN_ (Random)
 

Private Attributes

UInt32 state_
 

Detailed Description

Definition at line 7636 of file gtest.h.

Constructor & Destructor Documentation

◆ Random()

testing::internal::Random::Random ( UInt32  seed)
inlineexplicit

Definition at line 7640 of file gtest.h.

Member Function Documentation

◆ Generate()

UInt32 testing::internal::Random::Generate ( UInt32  range)

Definition at line 1775 of file gtest-all.cc.

References GTEST_CHECK_, kMaxRange, and state_.

Referenced by testing::internal::ShuffleRange().

◆ GTEST_DISALLOW_COPY_AND_ASSIGN_()

testing::internal::Random::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( Random  )
private

◆ Reseed()

void testing::internal::Random::Reseed ( UInt32  seed)
inline

Definition at line 7642 of file gtest.h.

Referenced by testing::internal::UnitTestImpl::RunAllTests().

Member Data Documentation

◆ kMaxRange

const UInt32 testing::internal::Random::kMaxRange = 1u << 31
static

Definition at line 7638 of file gtest.h.

Referenced by Generate().

◆ state_

UInt32 testing::internal::Random::state_
private

Definition at line 7649 of file gtest.h.

Referenced by Generate().


The documentation for this class was generated from the following files: