fix test and tweak github action

This commit is contained in:
Carter Anderson 2020-05-28 23:43:45 -07:00
parent cb81f3a6f0
commit 8a14e61d0f
2 changed files with 14 additions and 7 deletions

View file

@ -21,5 +21,5 @@ jobs:
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose --all --no-default-features --features headless
run: cargo test --verbose --workspace

View file

@ -252,11 +252,18 @@ mod tests {
"a2_b2 batch should have e2 and e3"
);
assert_eq!(
batcher
.iter()
.collect::<Vec<&Batch<HandleUntyped, Entity, Data>>>(),
vec![&a1_b1_batch, &a2_b2_batch]
)
let mut found_a1_b1 = false;
let mut found_a2_b2 = false;
for batch in batcher.iter() {
if batch == &a1_b1_batch {
found_a1_b1 = true;
} else if batch == &a2_b2_batch {
found_a2_b2 = true;
}
}
assert!(found_a1_b1 && found_a2_b2);
assert_eq!(batcher.iter().count(), 2);
}
}