From 4cf0f1ee3512c51583a59170825b426ea47622fa Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Thu, 4 Mar 2021 15:47:09 -0500 Subject: [PATCH] decaying hashset unit test fixes --- test/util/test_llarp_util_decaying_hashset.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/util/test_llarp_util_decaying_hashset.cpp b/test/util/test_llarp_util_decaying_hashset.cpp index eb8cbc83b..28cc9371c 100644 --- a/test/util/test_llarp_util_decaying_hashset.cpp +++ b/test/util/test_llarp_util_decaying_hashset.cpp @@ -23,17 +23,17 @@ TEST_CASE("DecayingHashSet test decay static time", "[decaying-hashset]") TEST_CASE("DecayingHashSet test decay dynamic time", "[decaying-hashset]") { static constexpr llarp_time_t timeout = 5s; - constexpr auto now = llarp::time_now_ms; + const auto now = llarp::time_now_ms(); llarp::util::DecayingHashSet hashset{timeout}; const llarp::RouterID zero{}; REQUIRE(zero.IsZero()); REQUIRE(not hashset.Contains(zero)); - REQUIRE(hashset.Insert(zero)); + REQUIRE(hashset.Insert(zero, now)); REQUIRE(hashset.Contains(zero)); - hashset.Decay(now() + 1s); + hashset.Decay(now + 1s); REQUIRE(hashset.Contains(zero)); - hashset.Decay(now() + timeout); + hashset.Decay(now + timeout); REQUIRE(not hashset.Contains(zero)); - hashset.Decay(now() + timeout + 1s); + hashset.Decay(now + timeout + 1s); REQUIRE(not hashset.Contains(zero)); }