Get tests green

This commit is contained in:
Mikayla
2023-11-08 10:38:43 -08:00
parent 9b30f490c7
commit e1cb993878
133 changed files with 130 additions and 31992 deletions
+4 -7
View File
@@ -752,19 +752,16 @@ impl AppContext {
self.globals_by_type.insert(global_type, Box::new(global));
}
#[track_caller]
/// Clear all stored globals. Does not notify global observers.
#[cfg(any(test, feature = "test-support"))]
pub fn clear_globals(&mut self) {
dbg!(core::panic::Location::caller());
//todo!(notify globals?)
self.globals_by_type.drain();
}
/// Set the value of the global of the given type.
#[track_caller]
/// Remove the global of the given type from the app context. Does not notify global observers.
#[cfg(any(test, feature = "test-support"))]
pub fn remove_global<G: Any>(&mut self) -> G {
dbg!(core::panic::Location::caller());
let global_type = TypeId::of::<G>();
//todo!(notify globals?)
*self
.globals_by_type
.remove(&global_type)
+2
View File
@@ -98,6 +98,7 @@ impl BackgroundExecutor {
}
#[cfg(any(test, feature = "test-support"))]
#[track_caller]
pub fn block_test<R>(&self, future: impl Future<Output = R>) -> R {
self.block_internal(false, future)
}
@@ -106,6 +107,7 @@ impl BackgroundExecutor {
self.block_internal(true, future)
}
#[track_caller]
pub(crate) fn block_internal<R>(
&self,
background_only: bool,