update revlog test helper function to assign button_chosen correctly

This commit is contained in:
Jarrett Ye 2025-08-01 09:54:33 +08:00
parent cf090b8c60
commit a39f6deede
No known key found for this signature in database
GPG key ID: EBFC55E0C1A352BB

View file

@ -548,10 +548,14 @@ pub(crate) mod tests {
} }
pub(crate) fn revlog(review_kind: RevlogReviewKind, days_ago: i64) -> RevlogEntry { pub(crate) fn revlog(review_kind: RevlogReviewKind, days_ago: i64) -> RevlogEntry {
let button_chosen = match review_kind {
RevlogReviewKind::Manual | RevlogReviewKind::Rescheduled => 0,
_ => 3,
};
RevlogEntry { RevlogEntry {
review_kind, review_kind,
id: days_ago_ms(days_ago).into(), id: days_ago_ms(days_ago).into(),
button_chosen: 3, button_chosen,
interval: 1, interval: 1,
..Default::default() ..Default::default()
} }