Tests must come at the end

This commit is contained in:
Gwilym Inzani 2023-10-07 20:28:09 +01:00
parent 845e3d027a
commit 7454563325

View file

@ -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] #[must_use]
/// The behaviour of this function is undefined in the sense that it will output /// 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 /// 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"
);
}
}