Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
geieredgar committed Aug 2, 2023
1 parent a8749ac commit e8b189d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions crates/bevy_ecs/src/schedule/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1570,3 +1570,29 @@ impl ScheduleBuildSettings {
}
}
}

#[cfg(test)]
mod tests {
use crate::{
self as bevy_ecs,
schedule::{IntoSystemConfigs, IntoSystemSetConfig, Schedule, SystemSet},
world::World,
};

#[test]
fn ambiguous_with_not_breaking_run_conditions() {
#[derive(SystemSet, Debug, Clone, PartialEq, Eq, Hash)]
struct Set;

let mut world = World::new();
let mut schedule = Schedule::new();

schedule.configure_set(Set.run_if(|| false));
schedule.add_systems(
(|| panic!("This system must not run"))
.ambiguous_with(|| ())
.in_set(Set),
);
schedule.run(&mut world);
}
}

0 comments on commit e8b189d

Please sign in to comment.