Skip to content

Commit

Permalink
🔧 Disable overflow tests if there is no debug_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
wrenger committed Apr 14, 2024
1 parent 1f8620e commit 8311480
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ fn negative() {

#[test]
#[should_panic]
#[cfg(debug_assertions)]
fn negative_pos_overflow() {
#[bitfield(u32)]
struct MyBitfield {
Expand All @@ -187,6 +188,7 @@ fn negative_pos_overflow() {

#[test]
#[should_panic]
#[cfg(debug_assertions)]
fn negative_neg_overflow() {
#[bitfield(u32)]
struct MyBitfield {
Expand Down

0 comments on commit 8311480

Please sign in to comment.