From d5a31b7cb4226a62931fd72672422a3d2e789e7a Mon Sep 17 00:00:00 2001 From: practicalswift Date: Wed, 22 Apr 2020 19:51:42 +0000 Subject: [PATCH] tests: Add fuzzing harness for functions in primitives/block.h --- src/test/fuzz/block.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/fuzz/block.cpp b/src/test/fuzz/block.cpp index d1e92ce607..f30fa03e0b 100644 --- a/src/test/fuzz/block.cpp +++ b/src/test/fuzz/block.cpp @@ -62,4 +62,8 @@ void test_one_input(const std::vector& buffer) const size_t raw_memory_size = RecursiveDynamicUsage(block); const size_t raw_memory_size_as_shared_ptr = RecursiveDynamicUsage(std::make_shared(block)); assert(raw_memory_size_as_shared_ptr > raw_memory_size); + CBlock block_copy = block; + block_copy.SetNull(); + const bool is_null = block_copy.IsNull(); + assert(is_null); }