Skip to content

Commit

Permalink
test: Empty slice does not crash uniformity test
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Oct 28, 2024
1 parent d1ec8c8 commit ae9eef5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions triton-isa/src/op_stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,11 @@ mod tests {
assert!(shrinks_stack ^ grows_stack);
}

#[test]
fn empty_underflow_io_sequence_does_not_crash_uniformity_test() {
assert!(UnderflowIO::is_uniform_sequence(&[]));
}

#[proptest]
fn non_empty_uniform_underflow_io_sequence_is_either_reading_or_writing(
#[strategy(vec(arb(), 1..OpStackElement::COUNT))] sequence: Vec<UnderflowIO>,
Expand Down

0 comments on commit ae9eef5

Please sign in to comment.