use super::should_reset_scale_on_double_click;

#[test]
fn scale_reset_helper_requires_a_true_double_click_and_a_real_change() {
    assert!(!should_reset_scale_on_double_click(1, 350.0, 200.0));
    assert!(!should_reset_scale_on_double_click(2, 200.0, 200.0));
    assert!(should_reset_scale_on_double_click(2, 350.0, 200.0));
    assert!(should_reset_scale_on_double_click(2, 75.0, 100.0));
}

#[test]
fn scale_reset_handler_claims_double_click_and_reapplies_after_pointer_click() {
    let source = include_str!("../ui_components/scale_reset.rs");
    assert!(source.contains("gtk::PropagationPhase::Capture"));
    assert!(source.contains("gtk::EventSequenceState::Claimed"));
    assert!(source.contains("glib::idle_add_local_once"));
    assert!(source.contains("glib::timeout_add_local_once"));
    assert!(source.contains("[20_u64, 75]"));
}
