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 `dimensions`, as well as specific `contents`. The contents are provided as a collection of subscripts/value pairs to assign to the expected array.
(
mut self,
name: S,
subtype: ExprType,
dimensions: &[usize],
contents: Vec<(Vec<i32>, ConstantDatum)>,
)
| 896 | /// The contents are provided as a collection of subscripts/value pairs to assign to the |
| 897 | /// expected array. |
| 898 | pub fn expect_array<S: AsRef<str>>( |
| 899 | mut self, |
| 900 | name: S, |
| 901 | subtype: ExprType, |
| 902 | dimensions: &[usize], |
| 903 | contents: Vec<(Vec<i32>, ConstantDatum)>, |
| 904 | ) -> Self { |
| 905 | let key = SymbolKey::from(name); |
| 906 | assert!(!self.exp_arrays.contains_key(&key)); |
| 907 | self.exp_arrays |
| 908 | .insert(key, ExpArray { subtype, dimensions: dimensions.to_vec(), contents }); |
| 909 | self |
| 910 | } |
| 911 | |
| 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`. |
no test coverage detected