GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: tmp_project/StringUtils/TESTS/TEST_RANDOM/main.cpp Lines: 9 9 100.0 %
Date: 2024-12-09 15:30:52 Branches: 9 11 81.8 %

Line Branch Exec Source
1
2
/***************************************
3
	Auteur : Pierre Aubert
4
	Mail : pierre.aubert@lapp.in2p3.fr
5
	Licence : CeCILL-C
6
****************************************/
7
8
#include <iostream>
9
#include "phoenix_assert.h"
10
#include "phoenix_random.h"
11
12
///Test the color
13
1
void testRandom(){
14
1
	phoenix_initRandom();
15
// 	std::cout << "testRandom : random seed = " << phoenix_initRandom() << std::endl;
16
101
	for(size_t i(0lu); i < 100lu; ++i){
17
100
		float randVal = phoenix_getRandValue(0.0f, 1.0f);
18
// 		std::cout << "i = " << i << ", randVal = " << randVal << std::endl;
19


100
		phoenix_assert(randVal >= 0.0f && randVal < 1.0f);
20
	}
21
1
}
22
23
1
int main(int argc, char** argv){
24
1
	testRandom();
25
1
	return 0;
26
}
27
28