File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -45,25 +45,24 @@ 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.
48
50
{
49
51
TRng<ui32> r;
50
- r.C_ = 17 ;
51
52
std::normal_distribution<float > nd (0 , 1 );
52
- UNIT_ASSERT_DOUBLES_EQUAL (nd (r), - 0.877167 , 0.01 );
53
+ UNIT_ASSERT_DOUBLES_EQUAL (nd (r), 0.0 , nd. max () );
53
54
}
54
55
55
56
{
56
57
TRng<ui64> r;
57
- r.C_ = 17 ;
58
58
std::normal_distribution<double > nd (0 , 1 );
59
- UNIT_ASSERT_DOUBLES_EQUAL (nd (r), - 0.5615566731 , 0.01 );
59
+ UNIT_ASSERT_DOUBLES_EQUAL (nd (r), 0.0 , nd. max () );
60
60
}
61
61
62
62
{
63
63
TRng<ui16> r;
64
- r.C_ = 17 ;
65
64
std::normal_distribution<long double > nd (0 , 1 );
66
- UNIT_ASSERT_DOUBLES_EQUAL (nd (r), - 0.430375088 , 0.01 );
65
+ UNIT_ASSERT_DOUBLES_EQUAL (nd (r), 0.0 , nd. max () );
67
66
}
68
67
}
69
68
}
You can’t perform that action at this time.
0 commit comments