Add test for equality for PreRelease::Alpha
TODO: Fix failing test..
This commit is contained in:
parent
1d9242480a
commit
e687e27a5b
@ -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())),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user