From b80f91c6a2991708f2a5bf48a20809f80f95e7c3 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Tue, 28 Feb 2023 00:31:27 +0800 Subject: [PATCH] Disable 2 tests that shouldn't run in release mode (#736) These tests expect `debug_assert!` to panic: - `pos_of_panics_on_out_of_bounds` - `index_of_panics_on_out_of_bounds` --- src/tui/buffer.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tui/buffer.rs b/src/tui/buffer.rs index 3830798..8bc4931 100644 --- a/src/tui/buffer.rs +++ b/src/tui/buffer.rs @@ -480,6 +480,7 @@ mod tests { } #[test] + #[cfg(debug_assertions)] #[should_panic(expected = "outside the buffer")] fn pos_of_panics_on_out_of_bounds() { let rect = Rect::new(0, 0, 10, 10); @@ -490,6 +491,7 @@ mod tests { } #[test] + #[cfg(debug_assertions)] #[should_panic(expected = "outside the buffer")] fn index_of_panics_on_out_of_bounds() { let rect = Rect::new(0, 0, 10, 10);