mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +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 {}
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
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 display: display::Display,
|
||||
}
|
||||
|
@ -103,7 +99,7 @@ pub fn test_runner(tests: &[&dyn Testable]) {
|
|||
)
|
||||
.unwrap();
|
||||
|
||||
let mut gba = unsafe { Gba::single_new() };
|
||||
let mut gba = Gba::new();
|
||||
|
||||
for test in tests {
|
||||
test.run(&mut gba);
|
||||
|
|
Loading…
Reference in a new issue