mod.rs
 1  // Copyright (c) 2019-2025 Alpha-Delta Network Inc.
 2  // This file is part of the deltavm library.
 3  
 4  // Licensed under the Apache License, Version 2.0 (the "License");
 5  // you may not use this file except in compliance with the License.
 6  // You may obtain a copy of the License at:
 7  
 8  // http://www.apache.org/licenses/LICENSE-2.0
 9  
10  // Unless required by applicable law or agreed to in writing, software
11  // distributed under the License is distributed on an "AS IS" BASIS,
12  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  // See the License for the specific language governing permissions and
14  // limitations under the License.
15  
16  mod check_atomic_writes_are_batched;
17  pub use check_atomic_writes_are_batched::*;
18  
19  mod check_atomic_writes_can_be_aborted;
20  pub use check_atomic_writes_can_be_aborted::*;
21  
22  mod check_contains_key;
23  pub use check_contains_key::*;
24  
25  mod check_get_map;
26  pub use check_get_map::*;
27  
28  mod check_insert_and_get_value_speculative;
29  pub use check_insert_and_get_value_speculative::*;
30  
31  mod check_iterators_match;
32  pub use check_iterators_match::*;
33  
34  mod check_remove_and_get_value_speculative;
35  pub use check_remove_and_get_value_speculative::*;
36  
37  fn ensure_map_is_empty(map: &impl for<'a> crate::helpers::NestedMap<'a, usize, usize, String>) {
38      // Sanity check.
39      assert!(map.iter_pending().next().is_none());
40      assert!(map.iter_confirmed().next().is_none());
41      assert!(map.keys_confirmed().next().is_none());
42      assert!(map.values_confirmed().next().is_none());
43  }