fix unit test (#802)
This commit is contained in:
		
							parent
							
								
									5bd6deb974
								
							
						
					
					
						commit
						26be22e73c
					
				| @ -961,25 +961,16 @@ mod tests { | |||||||
|         // non existing components even when changing archetype.
 |         // non existing components even when changing archetype.
 | ||||||
|         world.insert(e4, (A(0), B(0))).unwrap(); |         world.insert(e4, (A(0), B(0))).unwrap(); | ||||||
| 
 | 
 | ||||||
|         let added_a = world |         let added_a = world.query::<(Added<A>, Entity)>().map(|(_, e)| e).next(); | ||||||
|             .query::<(Added<A>, Entity)>() |  | ||||||
|             .iter() |  | ||||||
|             .map(|(_, e)| e) |  | ||||||
|             .next(); |  | ||||||
|         assert!(added_a.is_none()); |         assert!(added_a.is_none()); | ||||||
| 
 | 
 | ||||||
|         assert_eq!(get_mutated_a(&mut world), vec![e4]); |         assert_eq!(get_mutated_a(&mut world), vec![e4]); | ||||||
| 
 | 
 | ||||||
|         let added_b = world |         let added_b = world.query::<(Added<B>, Entity)>().map(|(_, e)| e).next(); | ||||||
|             .query::<(Added<B>, Entity)>() |  | ||||||
|             .iter() |  | ||||||
|             .map(|(_, e)| e) |  | ||||||
|             .next(); |  | ||||||
|         assert!(added_b.is_some()); |         assert!(added_b.is_some()); | ||||||
| 
 | 
 | ||||||
|         let mutated_b = world |         let mutated_b = world | ||||||
|             .query_mut::<(Mutated<B>, Entity)>() |             .query_mut::<(Mutated<B>, Entity)>() | ||||||
|             .iter() |  | ||||||
|             .map(|(_, e)| e) |             .map(|(_, e)| e) | ||||||
|             .next(); |             .next(); | ||||||
|         assert!(mutated_b.is_none()); |         assert!(mutated_b.is_none()); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Carter Anderson
						Carter Anderson