Skip to content

Commit

Permalink
adjust the test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokathor committed Sep 24, 2019
1 parent 3e9d487 commit 75e817f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,17 @@ mod tests {
assert!(works5());
}

extern crate std;
#[test]
#[allow(clippy::assertions_on_constants)]
fn test_usage_within_a_function() {
cfg_if! {if #[cfg(debug_assertions)] {
std::println!("debug");
std::println!("debug2");
// we want to put more than one thing here to make sure that they
// all get configured properly.
assert!(cfg!(debug_assertions));
assert_eq!(4, 2+2);
} else {
std::println!("release");
std::println!("release2");
assert!(works1().is_some());
assert_eq!(10, 5+5);
}}
}
}

0 comments on commit 75e817f

Please sign in to comment.