From 7454563325b792a94e19d9badc17e60a396e3d26 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Sat, 7 Oct 2023 20:28:09 +0100 Subject: [PATCH] Tests must come at the end --- agb/src/interrupt.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/agb/src/interrupt.rs b/agb/src/interrupt.rs index 6cb8593d..c30c4b45 100644 --- a/agb/src/interrupt.rs +++ b/agb/src/interrupt.rs @@ -350,20 +350,6 @@ impl VBlank { } } -#[cfg(test)] -mod tests { - use super::*; - - #[test_case] - fn test_interrupt_table_length(_gba: &mut crate::Gba) { - assert_eq!( - unsafe { INTERRUPT_TABLE.len() }, - Interrupt::Gamepak as usize + 1, - "interrupt table should be able to store gamepak interrupt" - ); - } -} - #[must_use] /// The behaviour of this function is undefined in the sense that it will output /// some information in some way that can be interpreted in a way to give some @@ -384,3 +370,17 @@ pub fn profiler(timer: &mut crate::timer::Timer, period: u16) -> InterruptHandle }) } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test_case] + fn test_interrupt_table_length(_gba: &mut crate::Gba) { + assert_eq!( + unsafe { INTERRUPT_TABLE.len() }, + Interrupt::Gamepak as usize + 1, + "interrupt table should be able to store gamepak interrupt" + ); + } +}