fix some tests

This commit is contained in:
2025-08-13 11:22:56 +03:00
parent 64e142b8c6
commit bf63365370
2 changed files with 4 additions and 4 deletions

View File

@@ -102,7 +102,7 @@ int getClientsPings(const PIVector<ClientSendThread *> & clients) {
TEST(ClientServer, ManyClients) { TEST(ClientServer, ManyClients) {
auto const loop_timeout = 1000_ms; auto const loop_timeout = 100_ms;
constexpr int clients_count = 20; constexpr int clients_count = 20;
PIVector<ClientSendThread *> clients; PIVector<ClientSendThread *> clients;
auto s = createServer<false, false, 100_KiB>(); auto s = createServer<false, false, 100_KiB>();
@@ -147,7 +147,7 @@ TEST(ClientServer, ManyClients) {
} }
TEST(ClientServer, DynamicClients) { TEST(ClientServer, DynamicClients) {
auto const loop_timeout = 1000_ms; auto const loop_timeout = 100_ms;
constexpr int clients_count = 20; constexpr int clients_count = 20;
PIVector<ClientSendThread *> clients; PIVector<ClientSendThread *> clients;
PIMutex clients_mutex; PIMutex clients_mutex;

View File

@@ -351,7 +351,7 @@ TEST(PIMathMatrixT_Test, determinantIfSquare) {
matr.element(2, 1) = 2; matr.element(2, 1) = 2;
matr.element(2, 2) = 5; matr.element(2, 2) = 5;
d = matr.determinant(); d = matr.determinant();
EXPECT_DOUBLE_EQ(std::abs(i - d), 0.); EXPECT_NEAR(std::abs(i - d), 0., 1e-12);
} }
TEST(PIMathMatrixT_Test, invert) { TEST(PIMathMatrixT_Test, invert) {
@@ -400,7 +400,7 @@ TEST(PIMathMatrixT_Test, inverted) {
d2 = matrix2.determinant(); d2 = matrix2.determinant();
matrix3 = matrix1.inverted(); matrix3 = matrix1.inverted();
EXPECT_EQ(matrix1, matrix3); 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) { TEST(PIMathMatrixT_Test, toUpperTriangular) {