mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 00:01:34 +11:00
Always check the address to make sure that things work as expected
This commit is contained in:
parent
5feb67285d
commit
ce233f7d62
|
@ -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}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue