mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 06:30:19 +00:00
Re-enable test_property_type_registration() (#4419)
# Objective - This test was mysteriously commented out ## Solution - Re-enable it - Also done in #4299, but this is better as its own PR.
This commit is contained in:
parent
cf831d5185
commit
dbb2fcb677
1 changed files with 33 additions and 33 deletions
|
@ -353,6 +353,7 @@ impl<T: for<'a> Deserialize<'a> + Reflect> FromType<T> for ReflectDeserialize {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::TypeRegistration;
|
||||
use bevy_utils::HashMap;
|
||||
|
||||
#[test]
|
||||
fn test_get_short_name() {
|
||||
|
@ -390,37 +391,36 @@ mod test {
|
|||
);
|
||||
}
|
||||
|
||||
// TODO: re-enable
|
||||
// #[test]
|
||||
// fn test_property_type_registration() {
|
||||
// assert_eq!(
|
||||
// TypeRegistration::of::<Option<f64>>().short_name,
|
||||
// "Option<f64>"
|
||||
// );
|
||||
// assert_eq!(
|
||||
// TypeRegistration::of::<HashMap<u32, String>>().short_name,
|
||||
// "HashMap<u32, String>"
|
||||
// );
|
||||
// assert_eq!(
|
||||
// TypeRegistration::of::<Option<HashMap<u32, String>>>().short_name,
|
||||
// "Option<HashMap<u32, String>>"
|
||||
// );
|
||||
// assert_eq!(
|
||||
// TypeRegistration::of::<Option<HashMap<u32, Option<String>>>>().short_name,
|
||||
// "Option<HashMap<u32, Option<String>>>"
|
||||
// );
|
||||
// assert_eq!(
|
||||
// TypeRegistration::of::<Option<HashMap<String, Option<String>>>>().short_name,
|
||||
// "Option<HashMap<String, Option<String>>>"
|
||||
// );
|
||||
// assert_eq!(
|
||||
// TypeRegistration::of::<Option<HashMap<Option<String>, Option<String>>>>().short_name,
|
||||
// "Option<HashMap<Option<String>, Option<String>>>"
|
||||
// );
|
||||
// assert_eq!(
|
||||
// TypeRegistration::of::<Option<HashMap<Option<String>, (String, Option<String>)>>>()
|
||||
// .short_name,
|
||||
// "Option<HashMap<Option<String>, (String, Option<String>)>>"
|
||||
// );
|
||||
// }
|
||||
#[test]
|
||||
fn test_property_type_registration() {
|
||||
assert_eq!(
|
||||
TypeRegistration::of::<Option<f64>>().short_name,
|
||||
"Option<f64>"
|
||||
);
|
||||
assert_eq!(
|
||||
TypeRegistration::of::<HashMap<u32, String>>().short_name,
|
||||
"HashMap<u32, String>"
|
||||
);
|
||||
assert_eq!(
|
||||
TypeRegistration::of::<Option<HashMap<u32, String>>>().short_name,
|
||||
"Option<HashMap<u32, String>>"
|
||||
);
|
||||
assert_eq!(
|
||||
TypeRegistration::of::<Option<HashMap<u32, Option<String>>>>().short_name,
|
||||
"Option<HashMap<u32, Option<String>>>"
|
||||
);
|
||||
assert_eq!(
|
||||
TypeRegistration::of::<Option<HashMap<String, Option<String>>>>().short_name,
|
||||
"Option<HashMap<String, Option<String>>>"
|
||||
);
|
||||
assert_eq!(
|
||||
TypeRegistration::of::<Option<HashMap<Option<String>, Option<String>>>>().short_name,
|
||||
"Option<HashMap<Option<String>, Option<String>>>"
|
||||
);
|
||||
assert_eq!(
|
||||
TypeRegistration::of::<Option<HashMap<Option<String>, (String, Option<String>)>>>()
|
||||
.short_name,
|
||||
"Option<HashMap<Option<String>, (String, Option<String>)>>"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue