From e629850c3a81e4e0ec90546bfe39f7c9a432947a Mon Sep 17 00:00:00 2001 From: blinxen Date: Sat, 14 Oct 2023 17:37:12 +0200 Subject: [PATCH] [tests] Run search_char_idx_02 and search_line_break_idx_04 only in debug 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 --- src/tree/node_children.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tree/node_children.rs b/src/tree/node_children.rs index d9a6a0b4..fe6e9173 100644 --- a/src/tree/node_children.rs +++ b/src/tree/node_children.rs @@ -785,6 +785,7 @@ mod tests { #[test] #[should_panic] + #[cfg(debug_assertions)] fn search_char_idx_02() { let mut children = NodeChildren::new(); children.push(( @@ -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((