mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
scripted-diff: Use new FUZZ_TARGET macro everywhere
-BEGIN VERIFY SCRIPT-
ren() { sed --regexp-extended -i "s|$1|$2|g" $(git grep -l --extended-regexp "$1"); }
# Replace FUZZ_TARGET_INIT
ren 'FUZZ_TARGET_INIT\((.+), (.+)\)' 'FUZZ_TARGET(\1, .init = \2)'
# Delete unused FUZZ_TARGET_INIT
sed -i -e '37,39d' src/test/fuzz/fuzz.h
-END VERIFY SCRIPT-
This commit is contained in:
parent
fa36ad8b09
commit
fa6dfaaf45
46 changed files with 54 additions and 57 deletions
|
|
@ -1058,7 +1058,7 @@ void FuzzInitSmart()
|
|||
}
|
||||
|
||||
/** Fuzz target that runs TestNode on nodes generated using ConsumeNodeStable. */
|
||||
FUZZ_TARGET_INIT(miniscript_stable, FuzzInit)
|
||||
FUZZ_TARGET(miniscript_stable, .init = FuzzInit)
|
||||
{
|
||||
FuzzedDataProvider provider(buffer.data(), buffer.size());
|
||||
TestNode(GenNode([&](Type needed_type) {
|
||||
|
|
@ -1067,7 +1067,7 @@ FUZZ_TARGET_INIT(miniscript_stable, FuzzInit)
|
|||
}
|
||||
|
||||
/** Fuzz target that runs TestNode on nodes generated using ConsumeNodeSmart. */
|
||||
FUZZ_TARGET_INIT(miniscript_smart, FuzzInitSmart)
|
||||
FUZZ_TARGET(miniscript_smart, .init = FuzzInitSmart)
|
||||
{
|
||||
/** The set of types we aim to construct nodes for. Together they cover all. */
|
||||
static constexpr std::array<Type, 4> BASE_TYPES{"B"_mst, "V"_mst, "K"_mst, "W"_mst};
|
||||
|
|
@ -1079,7 +1079,7 @@ FUZZ_TARGET_INIT(miniscript_smart, FuzzInitSmart)
|
|||
}
|
||||
|
||||
/* Fuzz tests that test parsing from a string, and roundtripping via string. */
|
||||
FUZZ_TARGET_INIT(miniscript_string, FuzzInit)
|
||||
FUZZ_TARGET(miniscript_string, .init = FuzzInit)
|
||||
{
|
||||
FuzzedDataProvider provider(buffer.data(), buffer.size());
|
||||
auto str = provider.ConsumeRemainingBytesAsString();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue