diff --git a/agb/tests/test_multiboot.rs b/agb/tests/test_multiboot.rs index 5fe0247a..1ad686b4 100644 --- a/agb/tests/test_multiboot.rs +++ b/agb/tests/test_multiboot.rs @@ -8,12 +8,18 @@ fn hello() {} #[test_case] fn multiboot_test(_gba: &mut agb::Gba) { + let address: usize = hello as usize; + if option_env!("AGB_MULTIBOOT").is_some() { - let address = hello as usize; assert!( (0x0200_0000..0x0204_0000).contains(&address), "multiboot functions should all be in ewram 0x0300_0000 and 0x0300_8000, but was actually found to be at {address:#010X}" ); + } else { + assert!( + address >= 0x0800_0000, + "functions should all be in ROM >= 0x0800_0000, but was actually found to be at {address:#010X}" + ); } }