mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
tests: Re-arrange test cases in parse_univalue to increase coverage
This commit is contained in:
@@ -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&) {
|
||||
|
||||
Reference in New Issue
Block a user