File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,25 +45,24 @@ Y_UNIT_TEST_SUITE(TestCommonRNG) {
4545 }
4646
4747 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.
4850 {
4951 TRng<ui32> r;
50- r.C_ = 17 ;
5152 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 () );
5354 }
5455
5556 {
5657 TRng<ui64> r;
57- r.C_ = 17 ;
5858 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 () );
6060 }
6161
6262 {
6363 TRng<ui16> r;
64- r.C_ = 17 ;
6564 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 () );
6766 }
6867 }
6968}
You can’t perform that action at this time.
0 commit comments