Add test for equality for PreRelease::Alpha

TODO: Fix failing test..
This commit is contained in:
Nathan Fisher 2024-01-05 11:46:50 -05:00
parent 1d9242480a
commit e687e27a5b

View File

@ -207,4 +207,15 @@ mod tests {
assert_eq!("Rc".parse::<PreRelease>().unwrap(), PreRelease::RC(None)); assert_eq!("Rc".parse::<PreRelease>().unwrap(), PreRelease::RC(None));
assert_eq!("RC".parse::<PreRelease>().unwrap(), PreRelease::RC(None)); assert_eq!("RC".parse::<PreRelease>().unwrap(), PreRelease::RC(None));
} }
#[test]
fn equality() {
let a: u16 = PreRelease::Alpha(None).into();
let b: u16 = PreRelease::Alpha(Some(NonZeroU16::new(1).unwrap())).into();
assert_eq!(a, b);
assert_eq!(
PreRelease::Alpha(None),
PreRelease::Alpha(Some(NonZeroU16::new(1).unwrap())),
);
}
} }