mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
tests: Re-arrange test cases in parse_univalue to increase coverage
This commit is contained in:
parent
516cc6fc78
commit
46ef4cfe5f
1 changed files with 15 additions and 1 deletions
|
@ -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&) {
|
||||
|
|
Loading…
Reference in a new issue