diff --git a/near-sdk/src/store/vec/mod.rs b/near-sdk/src/store/vec/mod.rs index bf58d0824..1ceacf725 100644 --- a/near-sdk/src/store/vec/mod.rs +++ b/near-sdk/src/store/vec/mod.rs @@ -553,7 +553,7 @@ mod tests { use arbitrary::{Arbitrary, Unstructured}; use borsh::{to_vec, BorshDeserialize}; use rand::{Rng, RngCore, SeedableRng}; - use std::ops::IndexMut; + use std::ops::{Bound, IndexMut}; use super::Vector; use crate::{store::IndexMap, test_utils::test_env::setup_free}; @@ -595,6 +595,13 @@ mod tests { vec.drain(..=u32::MAX); } + #[test] + #[should_panic] + fn test_drain_panic_2() { + let mut vec: Vector = Vector::new(b"b"); + vec.drain((Bound::Excluded(u32::MAX), Bound::Included(u32::MAX))); + } + #[test] fn test_replace_method() { let mut vec = Vector::new(b"b");