Skip to content

PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust

Fix clock-dependent form properties test (#3367)

Earl Co6e61b50503be
diff --git a/crates/ui-egui/tests/prepare.rs b/crates/ui-egui/tests/prepare.rs
index d63df5232..a2b173c7a 100644
--- a/crates/ui-egui/tests/prepare.rs
+++ b/crates/ui-egui/tests/prepare.rs
@@ -254,6 +254,9 @@ fn options_tab_sets_the_check_box_style() {
fn button_label_is_editable_without_renaming_the_field() {
use pdfcraft_engine::{Edit, NewField};
let mut h = harness();
+ // The byte comparisons below must not vary with the save's /ModDate.
+ let session = &mut h.state_mut().session;
+ *session = std::mem::take(session).with_clock(|| 1_700_000_000);
h.state_mut().apply_edit(Edit::AddField {
page: 0,
rect: [40.0, 300.0, 190.0, 330.0],