Merge rust-bitcoin/rust-bitcoin#4131: fuzz: add coverage for Display for Script
2688abad19
fuzz: add coverage for Display for Script (Bruno Garcia) Pull request description: We currently have the `script_bytes_to_asm_fmt` which fuzzes the `fmt_asm` function. However, this function is deprecated and the script's Display impl should be used instead. This PR adds fuzz coverage for it. ACKs for top commit: tcharding: ACK2688abad19
apoelstra: ACK 2688abad19198128d799d020d28945a0aaeb1fef; successfully ran local tests; nice! Tree-SHA512: 80aaeb7f6b0ae735554df2280822ea1be2a6b5576e0afd7fbfba65315f20bc44ef280e12a25415c6dda226b3b9632f6ea9ab34c3b22fc92e60d14a0f7e1de053
This commit is contained in:
commit
6f1c0f0b8c
|
@ -9,6 +9,7 @@ fn do_test(data: &[u8]) {
|
||||||
if let Ok(script) = s {
|
if let Ok(script) = s {
|
||||||
let _: Result<Vec<script::Instruction>, script::Error> = script.instructions().collect();
|
let _: Result<Vec<script::Instruction>, script::Error> = script.instructions().collect();
|
||||||
|
|
||||||
|
let _ = script.to_string();
|
||||||
let mut b = script::Builder::new();
|
let mut b = script::Builder::new();
|
||||||
for ins in script.instructions_minimal() {
|
for ins in script.instructions_minimal() {
|
||||||
if ins.is_err() {
|
if ins.is_err() {
|
||||||
|
|
Loading…
Reference in New Issue