Commit Graph

8 Commits

Author SHA1 Message Date
Antonio Sanchez
b271110788 Bump up rand histogram threshold.
The previous one sometimes fails for MSVC which has a poor random
number generator.

Fixes #2182
2021-03-10 22:17:03 -08:00
Antonio Sanchez
8d9cfba799 Fix rand test for MSVC.
MSVC's uniform random number generator is not quite as uniform as
others, requiring a slightly wider threshold on the histogram test.
After inspecting histograms for several runs, there's no obvious
bias -- just some bins end up having slightly more less elements
(often > 2% but less than 2.5%).
2021-01-07 12:48:40 -08:00
Gael Guennebaud
82f0ce2726 Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }.
This provide several advantages:
- more flexibility in designing unit tests
- unit tests can be glued to speed up compilation
- unit tests are compiled with same predefined macros, which is a requirement for zapcc
2018-07-17 14:46:15 +02:00
Gael Guennebaud
82147cefff Fix possible overflow and biais in integer random generator 2016-08-23 13:25:31 +02:00
Gael Guennebaud
2c9e4fa417 Add debug output for random unit test 2016-04-13 22:56:12 +02:00
Doug Kwan
239c9946cd Specified signedness of char type in test so that test passes
consistently on different targets.
2015-09-28 14:26:10 -07:00
Gael Guennebaud
9ee62fdcd5 Fix random unit test for 32bits systems. 2015-03-19 21:39:37 +01:00
Gael Guennebaud
f329d0908a Improve random number generation for integer and add unit test 2015-03-19 15:10:36 +01:00