Unit test debug print of witness with empty instruction
We recently fixed a bug that causes a panic if a `Witness` contains an empty instruction. Add a unit test to verify it.
This commit is contained in:
parent
e96be5ee6e
commit
84614d9997
|
@ -535,6 +535,16 @@ mod test {
|
|||
v
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn witness_debug_can_display_empty_instruction() {
|
||||
let witness = Witness {
|
||||
witness_elements: 1,
|
||||
content: append_u32_vec(vec![], &[0]),
|
||||
indices_start: 2,
|
||||
};
|
||||
println!("{:?}", witness);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_push() {
|
||||
let mut witness = Witness::default();
|
||||
|
|
Loading…
Reference in New Issue