fix some tests
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user