From 318c341271fb8c09d553d0a70ceddeb472b51d9e Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Thu, 10 Aug 2023 00:05:36 -0400 Subject: [PATCH] Fix test failures from running tests These mostly have to do with the test environment itself, so we might not want to keep these changes, if they are fixed in the runner. --- ctru-rs/src/services/gfx.rs | 7 ++++--- ctru-rs/src/services/romfs.rs | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ctru-rs/src/services/gfx.rs b/ctru-rs/src/services/gfx.rs index 68ac957..77198cf 100644 --- a/ctru-rs/src/services/gfx.rs +++ b/ctru-rs/src/services/gfx.rs @@ -344,7 +344,7 @@ impl Gfx { /// // Simple main loop. /// while apt.main_loop() { /// // Main program logic - /// + /// /// // Wait for the screens to refresh. /// // This blocks the current thread to make it run at 60Hz. /// gfx.wait_for_vblank(); @@ -499,7 +499,8 @@ mod tests { #[test] fn gfx_duplicate() { - // We don't need to build a `Gfx` because the test runner has one already - assert!(matches!(Gfx::new(), Err(Error::ServiceAlreadyActive))); + // NOTE: this will fail if using the console test runner, since that creates + // a Gfx as part of its test setup. + Gfx::new().unwrap(); } } diff --git a/ctru-rs/src/services/romfs.rs b/ctru-rs/src/services/romfs.rs index e6f1c3b..bc0896d 100644 --- a/ctru-rs/src/services/romfs.rs +++ b/ctru-rs/src/services/romfs.rs @@ -84,6 +84,7 @@ mod tests { use super::*; #[test] + #[ignore = "library test .elf doesn't have the romfs in it. citra runner needs to support 3dsx"] fn romfs_counter() { let _romfs = RomFS::new().unwrap(); let value = *ROMFS_ACTIVE.lock().unwrap();