diff options
author | Alexander Fokin <apfokin@gmail.com> | 2022-02-10 16:45:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:38 +0300 |
commit | 863a59a65247c24db7cb06789bc5cf79d04da32f (patch) | |
tree | 139dc000c8cd4a40f5659e421b7c75135d080307 /util/generic/ymath_ut.cpp | |
parent | f64e95a9eb9ab03240599eb9581c5a9102426a96 (diff) | |
download | ydb-863a59a65247c24db7cb06789bc5cf79d04da32f.tar.gz |
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/generic/ymath_ut.cpp')
-rw-r--r-- | util/generic/ymath_ut.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/util/generic/ymath_ut.cpp b/util/generic/ymath_ut.cpp index 29190b55eb..3baea7928f 100644 --- a/util/generic/ymath_ut.cpp +++ b/util/generic/ymath_ut.cpp @@ -31,7 +31,7 @@ class TMathTest: public TTestBase { UNIT_TEST(TestErf); UNIT_TEST(TestLogGamma); UNIT_TEST(TestIsValidFloat); - UNIT_TEST(TestAbs); + UNIT_TEST(TestAbs); UNIT_TEST(TestPower); UNIT_TEST(TestSigmoid); UNIT_TEST(TestCeilDiv); @@ -42,7 +42,7 @@ private: void TestSqr(); void TestErf(); void TestLogGamma(); - void TestAbs(); + void TestAbs(); void TestPower(); void TestSigmoid(); void TestCeilDiv(); @@ -63,8 +63,8 @@ private: inline void TestLog2() { UNIT_ASSERT_DOUBLES_EQUAL(Log2(2.0), 1.0, 1e-10); - UNIT_ASSERT_DOUBLES_EQUAL(Log2(2ull), 1.0, 1e-10); - UNIT_ASSERT_DOUBLES_EQUAL(Log2(2.0f), 1.0f, 1e-7f); + UNIT_ASSERT_DOUBLES_EQUAL(Log2(2ull), 1.0, 1e-10); + UNIT_ASSERT_DOUBLES_EQUAL(Log2(2.0f), 1.0f, 1e-7f); } inline void ValueBitCount() { @@ -162,16 +162,16 @@ void TMathTest::TestLogGamma() { curVal += log(i - 0.5); } } - -void TMathTest::TestAbs() { - UNIT_ASSERT_VALUES_EQUAL(Abs(1), 1); - UNIT_ASSERT_VALUES_EQUAL(Abs(-1), 1); - UNIT_ASSERT_VALUES_EQUAL(Abs(-1000000000000ll), 1000000000000ll); - UNIT_ASSERT_VALUES_EQUAL(Abs(0), 0); - UNIT_ASSERT_VALUES_EQUAL(Abs(1.0), 1.0); - UNIT_ASSERT_VALUES_EQUAL(Abs(-1.0), 1.0); - UNIT_ASSERT_VALUES_EQUAL(Abs(0.0), 0.0); -} + +void TMathTest::TestAbs() { + UNIT_ASSERT_VALUES_EQUAL(Abs(1), 1); + UNIT_ASSERT_VALUES_EQUAL(Abs(-1), 1); + UNIT_ASSERT_VALUES_EQUAL(Abs(-1000000000000ll), 1000000000000ll); + UNIT_ASSERT_VALUES_EQUAL(Abs(0), 0); + UNIT_ASSERT_VALUES_EQUAL(Abs(1.0), 1.0); + UNIT_ASSERT_VALUES_EQUAL(Abs(-1.0), 1.0); + UNIT_ASSERT_VALUES_EQUAL(Abs(0.0), 0.0); +} void TMathTest::TestPower() { UNIT_ASSERT_VALUES_EQUAL(Power(0, 0), 1); |