From ae9eef58028cd9f8375d1656593bb5f0e310858c Mon Sep 17 00:00:00 2001 From: Jan Ferdinand Sauer Date: Mon, 28 Oct 2024 11:20:10 +0100 Subject: [PATCH] test: Empty slice does not crash uniformity test --- triton-isa/src/op_stack.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/triton-isa/src/op_stack.rs b/triton-isa/src/op_stack.rs index cbd89951d..c9938cb41 100644 --- a/triton-isa/src/op_stack.rs +++ b/triton-isa/src/op_stack.rs @@ -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,