Files
continuwuity/src/core/matrix/pdu/tests.rs
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
420 B
Rust
Raw Normal View History

2024-11-07 03:30:47 +00:00
use super::Count;
2024-11-02 06:12:54 +00:00
#[test]
fn backfilled_parse() {
2024-11-07 03:30:47 +00:00
let count: Count = "-987654".parse().expect("parse() failed");
let backfilled = matches!(count, Count::Backfilled(_));
2024-11-02 06:12:54 +00:00
assert!(backfilled, "not backfilled variant");
}
#[test]
fn normal_parse() {
2024-11-07 03:30:47 +00:00
let count: Count = "987654".parse().expect("parse() failed");
let backfilled = matches!(count, Count::Backfilled(_));
2024-11-02 06:12:54 +00:00
assert!(!backfilled, "backfilled variant");
}