|
|
|
@ -148,7 +148,9 @@ mod tests { |
|
|
|
|
let entity = Entity::new_checked(1337, 42).unwrap(); |
|
|
|
|
let component: Component = entity.into(); |
|
|
|
|
assert!(component.is_entity()); |
|
|
|
|
assert_eq!(entity, component.try_into().unwrap()); |
|
|
|
|
|
|
|
|
|
let back_to_entity: Entity = component.try_into().unwrap(); |
|
|
|
|
assert_eq!(entity, back_to_entity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[test] |
|
|
|
@ -156,6 +158,8 @@ mod tests { |
|
|
|
|
let relation = Relation::new_checked(20, 21).unwrap(); |
|
|
|
|
let component: Component = relation.into(); |
|
|
|
|
assert!(component.is_relation()); |
|
|
|
|
assert_eq!(relation, component.try_into().unwrap()); |
|
|
|
|
|
|
|
|
|
let back_to_relation: Relation = component.try_into().unwrap(); |
|
|
|
|
assert_eq!(relation, back_to_relation); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|