Skip to content

Commit

Permalink
Derive Eq for types which derive PartialEq
Browse files Browse the repository at this point in the history
  • Loading branch information
ijc committed Jul 21, 2022
1 parent d2d6640 commit e895761
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions crates/test-case-macros/src/complex_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mod kw {
syn::custom_keyword!(matches_regex);
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum OrderingToken {
Eq,
Lt,
Expand All @@ -47,57 +47,57 @@ pub enum OrderingToken {
Geq,
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum PathToken {
Any,
Dir,
File,
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct Ord {
pub token: OrderingToken,
pub expected_value: Box<Expr>,
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct AlmostEqual {
pub expected_value: Box<Expr>,
pub precision: Box<Expr>,
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct Path {
pub token: PathToken,
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct Contains {
pub expected_element: Box<Expr>,
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct ContainsInOrder {
pub expected_slice: Box<Expr>,
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct Len {
pub expected_len: Box<Expr>,
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct Count {
pub expected_len: Box<Expr>,
}

#[cfg(feature = "with-regex")]
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct Regex {
pub expected_regex: Box<Expr>,
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum ComplexTestCase {
Not(Box<ComplexTestCase>),
And(Vec<ComplexTestCase>),
Expand Down

0 comments on commit e895761

Please sign in to comment.