From bf63365370ca1bd3b95a635580c5ddb1df4491af Mon Sep 17 00:00:00 2001 From: "andrey.bychkov" Date: Wed, 13 Aug 2025 11:22:56 +0300 Subject: [PATCH] fix some tests --- tests/client_server/client_server_test.cpp | 4 ++-- tests/math/testpimathmatrixt.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/client_server/client_server_test.cpp b/tests/client_server/client_server_test.cpp index e85df95c..bbe639c5 100644 --- a/tests/client_server/client_server_test.cpp +++ b/tests/client_server/client_server_test.cpp @@ -102,7 +102,7 @@ int getClientsPings(const PIVector & clients) { TEST(ClientServer, ManyClients) { - auto const loop_timeout = 1000_ms; + auto const loop_timeout = 100_ms; constexpr int clients_count = 20; PIVector clients; auto s = createServer(); @@ -147,7 +147,7 @@ TEST(ClientServer, ManyClients) { } TEST(ClientServer, DynamicClients) { - auto const loop_timeout = 1000_ms; + auto const loop_timeout = 100_ms; constexpr int clients_count = 20; PIVector clients; PIMutex clients_mutex; diff --git a/tests/math/testpimathmatrixt.cpp b/tests/math/testpimathmatrixt.cpp index 8900aa99..0245599c 100644 --- a/tests/math/testpimathmatrixt.cpp +++ b/tests/math/testpimathmatrixt.cpp @@ -351,7 +351,7 @@ TEST(PIMathMatrixT_Test, determinantIfSquare) { matr.element(2, 1) = 2; matr.element(2, 2) = 5; d = matr.determinant(); - EXPECT_DOUBLE_EQ(std::abs(i - d), 0.); + EXPECT_NEAR(std::abs(i - d), 0., 1e-12); } TEST(PIMathMatrixT_Test, invert) { @@ -400,7 +400,7 @@ TEST(PIMathMatrixT_Test, inverted) { d2 = matrix2.determinant(); matrix3 = matrix1.inverted(); EXPECT_EQ(matrix1, matrix3); - EXPECT_DOUBLE_EQ(std::abs(d1 - (1. / d2)), 0.); + EXPECT_NEAR(std::abs(d1 - (1. / d2)), 0., 1e-12); } TEST(PIMathMatrixT_Test, toUpperTriangular) {