diff options
| author | practicalswift <[email protected]> | 2020-04-22 19:51:42 +0000 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2020-04-22 19:51:42 +0000 |
| commit | d5a31b7cb4226a62931fd72672422a3d2e789e7a (patch) | |
| tree | 159f8731d786815ba45e01801999002f534b884b /src/test/fuzz | |
| parent | Merge #18575: bench: Remove requirement that all benches use same testing setup (diff) | |
| download | discoin-d5a31b7cb4226a62931fd72672422a3d2e789e7a.tar.xz discoin-d5a31b7cb4226a62931fd72672422a3d2e789e7a.zip | |
tests: Add fuzzing harness for functions in primitives/block.h
Diffstat (limited to 'src/test/fuzz')
| -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 d1e92ce60..f30fa03e0 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); } |