fix unit test (#802)

This commit is contained in:
Carter Anderson 2020-11-06 12:49:20 -08:00 committed by GitHub
parent 5bd6deb974
commit 26be22e73c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -961,25 +961,16 @@ mod tests {
// non existing components even when changing archetype.
world.insert(e4, (A(0), B(0))).unwrap();
let added_a = world
.query::<(Added<A>, Entity)>()
.iter()
.map(|(_, e)| e)
.next();
let added_a = world.query::<(Added<A>, Entity)>().map(|(_, e)| e).next();
assert!(added_a.is_none());
assert_eq!(get_mutated_a(&mut world), vec![e4]);
let added_b = world
.query::<(Added<B>, Entity)>()
.iter()
.map(|(_, e)| e)
.next();
let added_b = world.query::<(Added<B>, Entity)>().map(|(_, e)| e).next();
assert!(added_b.is_some());
let mutated_b = world
.query_mut::<(Mutated<B>, Entity)>()
.iter()
.map(|(_, e)| e)
.next();
assert!(mutated_b.is_none());