1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-07-28 18:58:30 +00:00
continuwuity/src/core/pdu/tests.rs

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

20 lines
450 B
Rust
Raw Normal View History

#![cfg(test)]
use super::PduCount;
#[test]
fn backfilled_parse() {
let count: PduCount = "-987654".parse().expect("parse() failed");
let backfilled = matches!(count, PduCount::Backfilled(_));
assert!(backfilled, "not backfilled variant");
}
#[test]
fn normal_parse() {
let count: PduCount = "987654".parse().expect("parse() failed");
let backfilled = matches!(count, PduCount::Backfilled(_));
assert!(!backfilled, "backfilled variant");
}