-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e3ed903 test: Parse witness module (Christian Lewe) 9628306 feat: Parse WitnessValues from code (Christian Lewe) Pull request description: Make witness JSON parsing via serde optional. Introduce witness modules as an alternative way to provide witness data. Witness modules are written directly inside the Simfony source code. ACKs for top commit: apoelstra: ACK e3ed903 successfully ran local tests Tree-SHA512: 3fab641207cee5555c350fc48a3d2d4fd18365b5d7e9dfe931e8aed008b6039dfb67365ad958f7717514eeb29239bccfe1ba4f3c9240bf9534d4a286395835d4
- Loading branch information
Showing
13 changed files
with
391 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#![no_main] | ||
|
||
use libfuzzer_sys::fuzz_target; | ||
|
||
use simfony::parse::ParseFromStr; | ||
use simfony::witness::WitnessValues; | ||
|
||
fuzz_target!(|witness_values: WitnessValues| { | ||
let witness_text = witness_values.to_string(); | ||
let parsed_witness_text = | ||
WitnessValues::parse_from_str(&witness_text).expect("Witness module should be parseable"); | ||
assert_eq!( | ||
witness_values, parsed_witness_text, | ||
"Witness module should parse to original witness values" | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.