Skip to content

Commit

Permalink
rust - restore tests from #1451
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylt committed Sep 10, 2024
1 parent a32b8b1 commit dd9ae86
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions rust/libceed/src/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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(())
/// # }
/// ```
Expand Down Expand Up @@ -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()?;
///
Expand Down

0 comments on commit dd9ae86

Please sign in to comment.