diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-04-22 19:51:42 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-04-22 19:51:42 +0000 |
commit | d5a31b7cb4226a62931fd72672422a3d2e789e7a (patch) | |
tree | 159f8731d786815ba45e01801999002f534b884b /src | |
parent | a7a6f1ff417abc2452a2a2b9edcd2f12d6c14441 (diff) |
tests: Add fuzzing harness for functions in primitives/block.h
Diffstat (limited to 'src')
-rw-r--r-- | src/test/fuzz/block.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<uint8_t>& buffer) const size_t raw_memory_size = RecursiveDynamicUsage(block); const size_t raw_memory_size_as_shared_ptr = RecursiveDynamicUsage(std::make_shared<CBlock>(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); } |