add test for length of interrupt table

This commit is contained in:
Corwin Kuiper 2021-06-24 19:52:45 +01:00
parent d607f892e3
commit ac5fd06106

View file

@ -222,6 +222,15 @@ fn test_vblank_interrupt_handler(gba: &mut crate::Gba) {
); );
} }
#[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"
);
}
#[derive(Clone, Copy, PartialEq, Eq, Debug)] #[derive(Clone, Copy, PartialEq, Eq, Debug)]
enum MutexState { enum MutexState {
Unlocked, Unlocked,