Skip to content

Commit

Permalink
another to error cases for date filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Stepanov committed Jun 23, 2016
1 parent ea22e3e commit 63c5321
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,5 +570,11 @@ mod tests {

assert_eq!(failed!(date, tos!("13 Jun 2016 02:30:00 +0300"), &[Num(0f32)]),
FilterError::InvalidArgument(0, "Str expected".to_owned()));

assert_eq!(failed!(date, tos!("13 Jun 2016 02:30:00 +0300")),
FilterError::InvalidArgumentCount("expected 1, 0 given".to_owned()));

assert_eq!(failed!(date, tos!("13 Jun 2016 02:30:00 +0300"), &[Num(0f32), Num(1f32)]),
FilterError::InvalidArgumentCount("expected 1, 2 given".to_owned()));
}
}

0 comments on commit 63c5321

Please sign in to comment.