mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
update unit test of bypassed_learning_is_handled
This commit is contained in:
parent
e6e7a58300
commit
35fa731b75
1 changed files with 8 additions and 10 deletions
|
@ -386,8 +386,8 @@ mod tests {
|
||||||
difficulty: 5.7909784,
|
difficulty: 5.7909784,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
// but if there's only a single revlog entry, we'll fall back on current card
|
// but if there's only a single revlog entry, we'll fall back on the first
|
||||||
// state
|
// non-manual entry
|
||||||
let item = single_card_revlog_to_item(
|
let item = single_card_revlog_to_item(
|
||||||
&fsrs,
|
&fsrs,
|
||||||
vec![RevlogEntry {
|
vec![RevlogEntry {
|
||||||
|
@ -398,17 +398,15 @@ mod tests {
|
||||||
TimestampSecs::now(),
|
TimestampSecs::now(),
|
||||||
0.9,
|
0.9,
|
||||||
0.into(),
|
0.into(),
|
||||||
)?;
|
)?
|
||||||
assert!(item.is_none());
|
.unwrap();
|
||||||
card.interval = 123;
|
assert!(item.item.reviews.is_empty());
|
||||||
card.ease_factor = 2000;
|
card.set_memory_state(&fsrs, Some(item), 0.9)?;
|
||||||
card.ctype = CardType::Review;
|
|
||||||
card.set_memory_state(&fsrs, item, 0.9)?;
|
|
||||||
assert_int_eq(
|
assert_int_eq(
|
||||||
card.memory_state,
|
card.memory_state,
|
||||||
Some(FsrsMemoryState {
|
Some(FsrsMemoryState {
|
||||||
stability: 122.99994,
|
stability: 99.999954,
|
||||||
difficulty: 7.334526,
|
difficulty: 5.840841,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue