From cb4eec13c03089617a94169b4e30381d87788b56 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Sun, 15 Mar 2020 00:28:08 +0000 Subject: [PATCH] tests: Add fuzzing harness for count_seconds(...) --- src/test/fuzz/integer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/fuzz/integer.cpp b/src/test/fuzz/integer.cpp index 980042e811..24459c21be 100644 --- a/src/test/fuzz/integer.cpp +++ b/src/test/fuzz/integer.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -31,6 +32,7 @@ #include #include +#include #include #include @@ -124,6 +126,8 @@ void test_one_input(const std::vector& buffer) assert(parsed_money == i64); } } + const std::chrono::seconds seconds{i64}; + assert(count_seconds(seconds) == i64); const arith_uint256 au256 = UintToArith256(u256); assert(ArithToUint256(au256) == u256);