mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
Add a few rslib unit tests
This commit is contained in:
parent
250b89be60
commit
adf969d37f
1 changed files with 8 additions and 0 deletions
|
@ -637,6 +637,10 @@ mod test {
|
||||||
s(ctx, "added:3").0,
|
s(ctx, "added:3").0,
|
||||||
format!("(c.id > {})", (timing.next_day_at - (86_400 * 3)) * 1_000)
|
format!("(c.id > {})", (timing.next_day_at - (86_400 * 3)) * 1_000)
|
||||||
);
|
);
|
||||||
|
assert_eq!(
|
||||||
|
s(ctx, "added:0").0,
|
||||||
|
s(ctx, "added:1").0,
|
||||||
|
);
|
||||||
|
|
||||||
// deck
|
// deck
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
@ -727,6 +731,10 @@ mod test {
|
||||||
(timing.next_day_at - (86_400 * 365)) * 1_000
|
(timing.next_day_at - (86_400 * 365)) * 1_000
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
assert_eq!(
|
||||||
|
s(ctx, "rated:0").0,
|
||||||
|
s(ctx, "rated:1").0
|
||||||
|
);
|
||||||
|
|
||||||
// props
|
// props
|
||||||
assert_eq!(s(ctx, "prop:lapses=3").0, "(lapses = 3)".to_string());
|
assert_eq!(s(ctx, "prop:lapses=3").0, "(lapses = 3)".to_string());
|
||||||
|
|
Loading…
Reference in a new issue