mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
fix test and tweak github action
This commit is contained in:
parent
cb81f3a6f0
commit
8a14e61d0f
2 changed files with 14 additions and 7 deletions
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue