UI tests clear the frame's texture changes: no "Dropped TexturesDelta" panic in debug builds
drive_value_takes_the_keyboard and boundary_fill_finds_the_cells_and_fills_the_ticked_ones dropped egui's output with texture deltas still pending (epaint's debug check); they clear them as the scenario harness does. All ui-egui tests pass in a debug build. Fixes #60 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT
This commit is contained in:
1 parent
7318b98b8d
commit
d1428ef27c
2 files changed
+3
-2
No files matched your search
@@ -250,7 +250,8 @@ fn drive_value_takes_the_keyboard() {
|
||||
let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1600.0, 1000.0));
|
||||
let frame = |app: &mut SolveApp, events: Vec<egui::Event>| {
|
||||
let input = egui::RawInput { screen_rect: Some(screen), events, ..Default::default() };
|
||||
ctx.run_ui(input, |ui| crate::dialogs::show(app, ui.ctx()))
|
||||
// Nothing renders here: drop the frame's texture changes deliberately.
|
||||
ctx.run_ui(input, |ui| crate::dialogs::show(app, ui.ctx())).textures_delta.clear();
|
||||
};
|
||||
frame(&mut app, vec![]);
|
||||
frame(&mut app, vec![]);
|
||||
|
||||
@@ -297,7 +297,7 @@ fn boundary_fill_finds_the_cells_and_fills_the_ticked_ones() {
|
||||
app.dialog = Some(d);
|
||||
// The dialog finds the cells on its next frame.
|
||||
let ctx = egui::Context::default();
|
||||
let _ = ctx.run_ui(Default::default(), |ui| crate::dialogs::show(&mut app, ui.ctx()));
|
||||
ctx.run_ui(Default::default(), |ui| crate::dialogs::show(&mut app, ui.ctx())).textures_delta.clear();
|
||||
let mut d = app.dialog.take().unwrap();
|
||||
let Kind::BoundaryFill { cells, .. } = &mut d.kind else { panic!() };
|
||||
// Only A, only B, and both.
|
||||
|
||||
Reference in new issue
Block a user