Skip to content

Commit

Permalink
[tests] Run search_char_idx_02 and search_line_break_idx_04 only in d…
Browse files Browse the repository at this point in the history
…ebug mode

Both tests only panic in debug mode because debug_assert is used
In release mode 'debug_assert' evaluates to a NOOP and the tests don't panic
  • Loading branch information
blinxen committed Oct 14, 2023
1 parent 387ea30 commit e629850
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tree/node_children.rs
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ mod tests {

#[test]
#[should_panic]
#[cfg(debug_assertions)]
fn search_char_idx_02() {
let mut children = NodeChildren::new();
children.push((
Expand Down Expand Up @@ -997,6 +998,7 @@ mod tests {

#[test]
#[should_panic]
#[cfg(debug_assertions)]
fn search_line_break_idx_04() {
let mut children = NodeChildren::new();
children.push((
Expand Down

0 comments on commit e629850

Please sign in to comment.