Skip to content

Commit

Permalink
bevyengine#4231: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Dec 21, 2022
1 parent aa4d904 commit 171ab5b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions crates/bevy_app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,4 +1117,16 @@ mod tests {
fn can_add_twice_the_same_plugin_not_unique() {
App::new().add_plugin(PluginD).add_plugin(PluginD);
}

#[test]
#[should_panic]
fn cant_call_app_run_from_plugin_build() {
struct PluginRun;
impl Plugin for PluginRun {
fn build(&self, app: &mut crate::App) {
app.run();
}
}
App::new().add_plugin(PluginRun);
}
}

0 comments on commit 171ab5b

Please sign in to comment.