mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 08:41:34 +11:00
change test to always go through Gba::new
This commit is contained in:
parent
ea8be33d3c
commit
3905c3e13a
|
@ -33,12 +33,8 @@ fn panic_implementation(info: &core::panic::PanicInfo) -> ! {
|
||||||
loop {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(test))]
|
|
||||||
static mut GBASINGLE: single::Singleton<Gba> = single::Singleton::new(unsafe { Gba::single_new() });
|
static mut GBASINGLE: single::Singleton<Gba> = single::Singleton::new(unsafe { Gba::single_new() });
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
static mut GBASINGLE: single::Singleton<Gba> = single::Singleton::empty();
|
|
||||||
|
|
||||||
pub struct Gba {
|
pub struct Gba {
|
||||||
pub display: display::Display,
|
pub display: display::Display,
|
||||||
}
|
}
|
||||||
|
@ -103,7 +99,7 @@ pub fn test_runner(tests: &[&dyn Testable]) {
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let mut gba = unsafe { Gba::single_new() };
|
let mut gba = Gba::new();
|
||||||
|
|
||||||
for test in tests {
|
for test in tests {
|
||||||
test.run(&mut gba);
|
test.run(&mut gba);
|
||||||
|
|
Loading…
Reference in a new issue