Skip to content

Commit

Permalink
add exclusive start_bound test
Browse files Browse the repository at this point in the history
  • Loading branch information
ruseinov committed Apr 26, 2024
1 parent fbc496a commit 13d4207
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion near-sdk/src/store/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -595,6 +595,13 @@ mod tests {
vec.drain(..=u32::MAX);
}

#[test]
#[should_panic]
fn test_drain_panic_2() {
let mut vec: Vector<bool> = 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");
Expand Down

0 comments on commit 13d4207

Please sign in to comment.