mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
tests: Add fuzzing of CSubNet, CNetAddr and CService related functions
This commit is contained in:
parent
7a861a62c1
commit
08eab0f599
1 changed files with 8 additions and 0 deletions
|
|
@ -123,4 +123,12 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
|||
|
||||
const CService other_service{net_addr, fuzzed_data_provider.ConsumeIntegral<uint16_t>()};
|
||||
assert((service == other_service) != (service != other_service));
|
||||
(void)(service < other_service);
|
||||
|
||||
const CSubNet sub_net_copy_1{net_addr, other_net_addr};
|
||||
const CSubNet sub_net_copy_2{net_addr};
|
||||
|
||||
CNetAddr mutable_net_addr;
|
||||
mutable_net_addr.SetIP(net_addr);
|
||||
assert(net_addr == mutable_net_addr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue