From 0def449d13327f246995615c6584c777672ecc0a Mon Sep 17 00:00:00 2001 From: Vladyslav Baranovskyi Date: Tue, 8 Oct 2024 20:46:39 +0300 Subject: [PATCH] Fixed Timestamp tests compilation error on linux --- tests/Math/Timestamp.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Math/Timestamp.cpp b/tests/Math/Timestamp.cpp index fc940cf..a41c1a5 100644 --- a/tests/Math/Timestamp.cpp +++ b/tests/Math/Timestamp.cpp @@ -16,7 +16,7 @@ TEST_CASE("Constructors", "[Timestamp]") REQUIRE(ts.GetNanos() == 0); REQUIRE(ts.GetSeconds() == 0.0); - ts = Timestamp(1'000'000'000ull); // 1 second + ts = Timestamp((uint64_t)1'000'000'000ull); // 1 second REQUIRE(ts.GetNanos() == 1'000'000'000ull); REQUIRE(ts.GetSeconds() == 1.0); @@ -27,8 +27,8 @@ TEST_CASE("Constructors", "[Timestamp]") TEST_CASE("Arithmetic operations", "[Timestamp]") { - Timestamp ts1(1'000'000'000ull); // 1 second - Timestamp ts2(2'000'000'000ull); // 2 seconds + Timestamp ts1((uint64_t)1'000'000'000ull); // 1 second + Timestamp ts2((uint64_t)2'000'000'000ull); // 2 seconds Timestamp result; result = ts1 + ts2; @@ -47,9 +47,9 @@ TEST_CASE("Arithmetic operations", "[Timestamp]") TEST_CASE("Comparison operators", "[Timestamp]") { - Timestamp ts1(1'000'000'000ull); // 1 second - Timestamp ts2(2'000'000'000ull); // 2 seconds - Timestamp ts3(1'000'000'000ull); + Timestamp ts1((uint64_t)1'000'000'000ull); // 1 second + Timestamp ts2((uint64_t)2'000'000'000ull); // 2 seconds + Timestamp ts3((uint64_t)1'000'000'000ull); REQUIRE(ts1 == ts3); REQUIRE(ts1 != ts2); @@ -62,7 +62,7 @@ TEST_CASE("Comparison operators", "[Timestamp]") TEST_CASE("Assignment operators", "[Timestamp]") { Timestamp ts; - ts = 1'000'000'000ull; + ts = (uint64_t)1'000'000'000ull; REQUIRE(ts.GetNanos() == 1'000'000'000ull); ts = 2.0; @@ -76,4 +76,4 @@ TEST_CASE("Division operator", "[Timestamp]") double result = ts1 / ts2; REQUIRE(result == 2.0); -} \ No newline at end of file +}