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`
This commit is contained in:
cyqsimon 2023-02-28 00:31:27 +08:00 committed by GitHub
parent f3bc646f24
commit b80f91c6a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);