Adds the `name` array as an array to expect in the final state of the machine. The array will be tested to have the same `subtype` and only one dimension with `contents`.
(
mut self,
name: S,
subtype: ExprType,
contents: Vec<ConstantDatum>,
)
| 912 | /// Adds the `name` array as an array to expect in the final state of the machine. The array |
| 913 | /// will be tested to have the same `subtype` and only one dimension with `contents`. |
| 914 | pub fn expect_array_simple<S: AsRef<str>>( |
| 915 | mut self, |
| 916 | name: S, |
| 917 | subtype: ExprType, |
| 918 | contents: Vec<ConstantDatum>, |
| 919 | ) -> Self { |
| 920 | let key = SymbolKey::from(name); |
| 921 | assert!(!self.exp_arrays.contains_key(&key)); |
| 922 | let mut exp_array = Vec::with_capacity(contents.len()); |
| 923 | for (i, value) in contents.into_iter().enumerate() { |
| 924 | exp_array.push((vec![i as i32], value)); |
| 925 | } |
| 926 | self.exp_arrays.insert( |
| 927 | key, |
| 928 | ExpArray { subtype, dimensions: vec![exp_array.len()], contents: exp_array }, |
| 929 | ); |
| 930 | self |
| 931 | } |
| 932 | |
| 933 | /// Adds tracking for all the side-effects of a clear operation on the machine. |
| 934 | pub fn expect_clear(mut self) -> Self { |
no test coverage detected