mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-28 18:58:30 +00:00
20 lines
450 B
Rust
20 lines
450 B
Rust
|
#![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");
|
||
|
}
|