mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 16:59:43 +01:00
Tests: the no-document canvas test runs its frames through part_frame
a_canvas_frame_without_a_document_releases_the_text_nodes creates its context once and runs each frame through crate::testing::part_frame with crate::canvas::show, in place of its own frame loop.
This commit is contained in:
1 parent
387b912010
commit
476437f29d
1 file changed
+2
-3
@@ -126,11 +126,10 @@ fn hidden_characters_off_and_a_closed_document_release_the_text_nodes() {
|
||||
/// shows the Home screen or, with Show The Home Screen When No Documents Are Open off, an empty window.
|
||||
#[test]
|
||||
fn a_canvas_frame_without_a_document_releases_the_text_nodes() {
|
||||
let ctx = crate::testing::ui_context();
|
||||
let frame = |app: &mut VectorcraftApp| {
|
||||
let ctx = crate::testing::ui_context();
|
||||
let raw = egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(Pos2::ZERO, Vec2::new(800.0, 600.0))), ..Default::default() };
|
||||
let mut out = ctx.run_ui(raw, |ui| crate::canvas::show(app, ui));
|
||||
out.textures_delta.clear();
|
||||
crate::testing::part_frame(app, &ctx, raw, crate::canvas::show);
|
||||
};
|
||||
for home in [true, false] {
|
||||
let mut app = app();
|
||||
|
||||
Reference in new issue
Block a user