PhoenixMock  1.8.7
Tools to split/merge/print mock used in Phoenix
main.cpp File Reference
#include <iostream>
#include "phoenix_assert.h"
#include "phoenix_random.h"
+ Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 
void testRandom ()
 Test the color. More...
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 23 of file main.cpp.

23  {
24  testRandom();
25  return 0;
26 }

References testRandom().

+ Here is the call graph for this function:

◆ testRandom()

void testRandom ( )

Test the color.

Definition at line 13 of file main.cpp.

13  {
15 // std::cout << "testRandom : random seed = " << phoenix_initRandom() << std::endl;
16  for(size_t i(0lu); i < 100lu; ++i){
17  float randVal = phoenix_getRandValue(0.0f, 1.0f);
18 // std::cout << "i = " << i << ", randVal = " << randVal << std::endl;
19  phoenix_assert(randVal >= 0.0f && randVal < 1.0f);
20  }
21 }

References phoenix_assert, phoenix_getRandValue(), and phoenix_initRandom().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
phoenix_getRandValue
T phoenix_getRandValue(const T &valInf, const T &valSup)
Get a random value between valInf and valSup.
Definition: phoenix_random_impl.h:31
phoenix_initRandom
unsigned int phoenix_initRandom()
Set the random seed.
Definition: phoenix_random.cpp:13
testRandom
void testRandom()
Test the color.
Definition: main.cpp:13
phoenix_assert
#define phoenix_assert(isOk)
Definition: phoenix_assert.h:19