File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -45,24 +45,25 @@ Y_UNIT_TEST_SUITE(TestCommonRNG) {
45
45
}
46
46
47
47
Y_UNIT_TEST (TestStlCompatibility) {
48
- // NOTE: Check if `TRng` can be passed to `std::normal_distribution::operator()`.
49
- // These tests just have to be compilable, so the asserts below are always true.
50
48
{
51
49
TRng<ui32> r;
50
+ r.C_ = 17 ;
52
51
std::normal_distribution<float > nd (0 , 1 );
53
- UNIT_ASSERT_DOUBLES_EQUAL (nd (r), 0.0 , nd. max () );
52
+ UNIT_ASSERT_DOUBLES_EQUAL (nd (r), - 0.877167 , 0.01 );
54
53
}
55
54
56
55
{
57
56
TRng<ui64> r;
57
+ r.C_ = 17 ;
58
58
std::normal_distribution<double > nd (0 , 1 );
59
- UNIT_ASSERT_DOUBLES_EQUAL (nd (r), 0.0 , nd. max () );
59
+ UNIT_ASSERT_DOUBLES_EQUAL (nd (r), - 0.5615566731 , 0.01 );
60
60
}
61
61
62
62
{
63
63
TRng<ui16> r;
64
+ r.C_ = 17 ;
64
65
std::normal_distribution<long double > nd (0 , 1 );
65
- UNIT_ASSERT_DOUBLES_EQUAL (nd (r), 0.0 , nd. max () );
66
+ UNIT_ASSERT_DOUBLES_EQUAL (nd (r), - 0.430375088 , 0.01 );
66
67
}
67
68
}
68
69
}
You can’t perform that action at this time.
0 commit comments