From dd9ae8604fb6c017ee6e32281961d6272729774a Mon Sep 17 00:00:00 2001 From: Jeremy L Thompson Date: Mon, 9 Sep 2024 14:48:28 -0600 Subject: [PATCH] rust - restore tests from #1451 --- rust/libceed/src/operator.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/rust/libceed/src/operator.rs b/rust/libceed/src/operator.rs index a1e5db55cb..809c78f6e6 100644 --- a/rust/libceed/src/operator.rs +++ b/rust/libceed/src/operator.rs @@ -142,6 +142,14 @@ impl<'a> OperatorField<'a> { /// inputs[0].elem_restriction().is_some(), /// "Incorrect field ElemRestriction" /// ); + /// if let ElemRestrictionOpt::Some(r) = inputs[0].elem_restriction() { + /// assert_eq!( + /// r.num_elements(), + /// ne, + /// "Incorrect field ElemRestriction number of elements" + /// ); + /// } + /// /// assert!( /// inputs[1].elem_restriction().is_none(), /// "Incorrect field ElemRestriction" @@ -153,6 +161,13 @@ impl<'a> OperatorField<'a> { /// outputs[0].elem_restriction().is_some(), /// "Incorrect field ElemRestriction" /// ); + /// if let ElemRestrictionOpt::Some(r) = outputs[0].elem_restriction() { + /// assert_eq!( + /// r.num_elements(), + /// ne, + /// "Incorrect field ElemRestriction number of elements" + /// ); + /// } /// # Ok(()) /// # } /// ``` @@ -196,7 +211,21 @@ impl<'a> OperatorField<'a> { /// let inputs = op.inputs()?; /// /// assert!(inputs[0].basis().is_some(), "Incorrect field Basis"); + /// if let BasisOpt::Some(b) = inputs[0].basis() { + /// assert_eq!( + /// b.num_quadrature_points(), + /// q, + /// "Incorrect field Basis number of quadrature points" + /// ); + /// } /// assert!(inputs[1].basis().is_some(), "Incorrect field Basis"); + /// if let BasisOpt::Some(b) = inputs[1].basis() { + /// assert_eq!( + /// b.num_quadrature_points(), + /// q, + /// "Incorrect field Basis number of quadrature points" + /// ); + /// } /// /// let outputs = op.outputs()?; ///