tests: Add fuzzing harness for functions in primitives/block.h

This commit is contained in:
practicalswift 2020-04-22 19:51:42 +00:00
parent a7a6f1ff41
commit d5a31b7cb4

View file

@ -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);
}