diff options
Diffstat (limited to 'crates/core/src/expressions')
| -rw-r--r-- | crates/core/src/expressions/mod.rs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/crates/core/src/expressions/mod.rs b/crates/core/src/expressions/mod.rs index 5ffb5a6..eadd55d 100644 --- a/crates/core/src/expressions/mod.rs +++ b/crates/core/src/expressions/mod.rs @@ -1040,7 +1040,7 @@ where /// Representation of an error that occurred within [`Expression`]. #[non_exhaustive] -#[derive(PartialEq, Eq)] +#[derive(Clone, PartialEq, Eq)] #[cfg_attr(feature = "core-fmt", derive(Debug))] pub enum Error { /// Memory reservation error. @@ -1093,6 +1093,10 @@ impl error::Error for Error {} #[cfg(all(test, feature = "core-error"))] mod test { + #![allow(clippy::arithmetic_side_effects)] + #![allow(clippy::indexing_slicing)] + #![allow(clippy::unreachable)] + #![allow(clippy::wildcard_enum_match_arm)] #![allow(clippy::expect_used)] use super::*; @@ -1258,7 +1262,10 @@ mod test { type Transition = ExpressionTransition; fn init_state() -> BoxedStrategy<Self::State> { - //TODO: randomly initialize state + //NOTE: we could randomly initialize state. i don't think this is + // necessary to test this sufficiently, but if we ever do, we + // also need to tweak the constructor of the [`Expression`] + // to replicate one from the reference state Just(Self::State::default()).boxed() } @@ -1436,17 +1443,8 @@ mod test { type Reference = ExpressionReference; fn init_test( - ref_state: &<Self::Reference as ReferenceStateMachine>::State, + _ref_state: &<Self::Reference as ReferenceStateMachine>::State, ) -> Self::SystemUnderTest { - /*let mut expr = Expression { - inner: Vec::new(), - interns: Vec::new(), - root: ref_state.root.map(NodeIndexInternal), - }; - - for node in ref_state.nodes { - //TODO: finish replicating state over here - }*/ ExpressionWrapper::Closed(Expression::new()) } |
