Just to have a chance to try it out: Switch to proptest.
This commit is contained in:
@@ -8,10 +8,12 @@ use async_std::task;
|
||||
#[cfg(test)]
|
||||
use futures::io::Cursor;
|
||||
use futures::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt};
|
||||
use proptest::proptest;
|
||||
#[cfg(test)]
|
||||
use quickcheck::{quickcheck, Arbitrary, Gen};
|
||||
use proptest_derive::Arbitrary;
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
#[cfg_attr(test, derive(Arbitrary))]
|
||||
pub struct ServerChoice {
|
||||
pub chosen_method: AuthenticationMethod,
|
||||
}
|
||||
@@ -56,15 +58,6 @@ impl ServerChoice {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
impl Arbitrary for ServerChoice {
|
||||
fn arbitrary(g: &mut Gen) -> ServerChoice {
|
||||
ServerChoice {
|
||||
chosen_method: AuthenticationMethod::arbitrary(g),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
standard_roundtrip!(server_choice_roundtrips, ServerChoice);
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user