diff --git a/src/test/fuzz/integer.cpp b/src/test/fuzz/integer.cpp index f3259f6598..7c2537aaf5 100644 --- a/src/test/fuzz/integer.cpp +++ b/src/test/fuzz/integer.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include void initialize() @@ -114,6 +115,12 @@ void test_one_input(const std::vector& buffer) (void)memusage::DynamicUsage(u8); const unsigned char uch = static_cast(u8); (void)memusage::DynamicUsage(uch); + { + const std::set i64s{i64, static_cast(u64)}; + const size_t dynamic_usage = memusage::DynamicUsage(i64s); + const size_t incremental_dynamic_usage = memusage::IncrementalDynamicUsage(i64s); + assert(dynamic_usage == incremental_dynamic_usage * i64s.size()); + } (void)MillisToTimeval(i64); const double d = ser_uint64_to_double(u64); assert(ser_double_to_uint64(d) == u64);