mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Ensure mod tests is at the end (#419)
Fixes build failure - [x] Changelog updated / no changelog update needed
This commit is contained in:
commit
3747d6192a
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue