diff --git a/agb-image-converter/src/lib.rs b/agb-image-converter/src/lib.rs index c8d9c9f3..c63c4656 100644 --- a/agb-image-converter/src/lib.rs +++ b/agb-image-converter/src/lib.rs @@ -569,21 +569,6 @@ pub fn include_font(input: TokenStream) -> TokenStream { .into() } -#[cfg(test)] -mod tests { - use asefile::AnimationDirection; - - #[test] - // These directions defined in agb and have these values. This is important - // when outputting code for agb. If more animation directions are added then - // we will have to support them there. - fn directions_to_agb() { - assert_eq!(AnimationDirection::Forward as usize, 0); - assert_eq!(AnimationDirection::Reverse as usize, 1); - assert_eq!(AnimationDirection::PingPong as usize, 2); - } -} - fn valid_sprite_size(width: u32, height: u32) -> bool { match (width, height) { (8, 8) => true, @@ -601,3 +586,18 @@ fn valid_sprite_size(width: u32, height: u32) -> bool { (_, _) => false, } } + +#[cfg(test)] +mod tests { + use asefile::AnimationDirection; + + #[test] + // These directions defined in agb and have these values. This is important + // when outputting code for agb. If more animation directions are added then + // we will have to support them there. + fn directions_to_agb() { + assert_eq!(AnimationDirection::Forward as usize, 0); + assert_eq!(AnimationDirection::Reverse as usize, 1); + assert_eq!(AnimationDirection::PingPong as usize, 2); + } +} diff --git a/agb/src/lib.rs b/agb/src/lib.rs index c4d3bd80..effd589f 100644 --- a/agb/src/lib.rs +++ b/agb/src/lib.rs @@ -360,6 +360,14 @@ pub mod test_runner { } } +#[inline(never)] +pub(crate) fn program_counter_before_interrupt() -> u32 { + extern "C" { + static mut agb_rs__program_counter: u32; + } + unsafe { agb_rs__program_counter } +} + #[cfg(test)] mod test { use super::Gba; @@ -444,11 +452,3 @@ mod test { } } } - -#[inline(never)] -pub(crate) fn program_counter_before_interrupt() -> u32 { - extern "C" { - static mut agb_rs__program_counter: u32; - } - unsafe { agb_rs__program_counter } -}