Skip to content

Commit fe8b6ef

Browse files
committed
Revert "Fix common_ops_ut (#161)"
This reverts commit 043286f.
1 parent a71c29e commit fe8b6ef

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

util/random/common_ops_ut.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,25 @@ 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.
5048
{
5149
TRng<ui32> r;
50+
r.C_ = 17;
5251
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);
5453
}
5554

5655
{
5756
TRng<ui64> r;
57+
r.C_ = 17;
5858
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);
6060
}
6161

6262
{
6363
TRng<ui16> r;
64+
r.C_ = 17;
6465
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);
6667
}
6768
}
6869
}

0 commit comments

Comments
 (0)