Skip to content

Commit

Permalink
Improve error reporting for clock test (#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Dec 16, 2022
1 parent b482851 commit 69f9d8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/old_tests/UnitTests/clock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ TEST_CASE("clock, time_t")
REQUIRE(clock::to_time_t(clock::from_time_t(now_tt)) == now_tt);

// Conversions are verified to be consistent. Now, verify that we're correctly converting epochs
const auto diff = abs(clock::now() - clock::from_time_t(time(nullptr)));
REQUIRE(diff < seconds{ 1 });
const auto diff = duration_cast<milliseconds>(abs(clock::now() - clock::from_time_t(time(nullptr)))).count();
REQUIRE(diff < 1000);
}

TEST_CASE("clock, FILETIME")
Expand Down

0 comments on commit 69f9d8c

Please sign in to comment.