Get tests green

This commit is contained in:
Mikayla 2023-11-08 10:38:43 -08:00
parent 9b30f490c7
commit e1cb993878
No known key found for this signature in database
133 changed files with 130 additions and 31992 deletions

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)