Skip to content

Commit 84b9aa8

Browse files
committed
make test less big
1 parent 0a78960 commit 84b9aa8

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

crates/bevy_ecs/src/lib.rs

+16-2
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,22 @@ mod tests {
637637
#[test]
638638
fn table_add_remove_many() {
639639
let mut world = World::default();
640-
let mut entities = Vec::with_capacity(10_000);
641-
for _ in 0..1000 {
640+
#[cfg(miri)]
641+
let mut entities = Vec::with_capacity(10);
642+
#[cfg(not(miri))]
643+
let mut entities = Vec::with_capacity(1_000);
644+
645+
let to;
646+
#[cfg(miri)]
647+
{
648+
to = 10;
649+
}
650+
#[cfg(not(miri))]
651+
{
652+
to = 1000;
653+
}
654+
655+
for _ in 0..to {
642656
entities.push(world.spawn().insert(B(0)).id());
643657
}
644658

0 commit comments

Comments
 (0)