diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-03-10 11:22:48 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-03-11 12:37:59 +0000 |
commit | 46ef4cfe5f416cb34e889646df3ee241b1d5ae5a (patch) | |
tree | d35930f72bf00d0a3d365c32ce9da6de06afffea /src/test/fuzz/parse_univalue.cpp | |
parent | 516cc6fc7842c13a1d54c6ea2b9e3d335a872125 (diff) |
tests: Re-arrange test cases in parse_univalue to increase coverage
Diffstat (limited to 'src/test/fuzz/parse_univalue.cpp')
-rw-r--r-- | src/test/fuzz/parse_univalue.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/test/fuzz/parse_univalue.cpp b/src/test/fuzz/parse_univalue.cpp index 3ad112dbad..73547cda3b 100644 --- a/src/test/fuzz/parse_univalue.cpp +++ b/src/test/fuzz/parse_univalue.cpp @@ -35,21 +35,31 @@ void test_one_input(const std::vector<uint8_t>& buffer) } try { (void)ParseHashO(univalue, "A"); + } catch (const UniValue&) { + } catch (const std::runtime_error&) { + } + try { (void)ParseHashO(univalue, random_string); } catch (const UniValue&) { } catch (const std::runtime_error&) { } try { (void)ParseHashV(univalue, "A"); + } catch (const UniValue&) { + } catch (const std::runtime_error&) { + } + try { (void)ParseHashV(univalue, random_string); } catch (const UniValue&) { } catch (const std::runtime_error&) { } try { (void)ParseHexO(univalue, "A"); + } catch (const UniValue&) { + } + try { (void)ParseHexO(univalue, random_string); } catch (const UniValue&) { - } catch (const std::runtime_error&) { } try { (void)ParseHexUV(univalue, "A"); @@ -59,6 +69,10 @@ void test_one_input(const std::vector<uint8_t>& buffer) } try { (void)ParseHexV(univalue, "A"); + } catch (const UniValue&) { + } catch (const std::runtime_error&) { + } + try { (void)ParseHexV(univalue, random_string); } catch (const UniValue&) { } catch (const std::runtime_error&) { |