Skip to content

Commit

Permalink
Trying to fix CI run
Browse files Browse the repository at this point in the history
  • Loading branch information
fjarri committed Mar 14, 2022
1 parent 05da8ed commit 6ff9200
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion k256/src/arithmetic/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,10 @@ mod tests {
}

#[test]
#[should_panic(expected = "assertion failed: self.normalized")]
#[cfg_attr(
debug_assertions,
should_panic(expected = "assertion failed: self.normalized")
)]
fn unnormalized_is_odd() {
// This is a regression test for https://github.com/RustCrypto/elliptic-curves/issues/529
// where `is_odd()` in debug mode force-normalized its argument
Expand All @@ -562,6 +565,7 @@ mod tests {
// This is fine.
assert!(y.normalize().is_odd().unwrap_u8() == 0);

// This panics since `y` is not normalized.
let _result = y.is_odd().unwrap_u8();
}

Expand Down

0 comments on commit 6ff9200

Please sign in to comment.