Just to have a chance to try it out: Switch to proptest.
This commit is contained in:
@@ -5,10 +5,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 ServerAuthResponse {
|
||||
pub success: bool,
|
||||
}
|
||||
@@ -55,14 +57,6 @@ impl ServerAuthResponse {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
impl Arbitrary for ServerAuthResponse {
|
||||
fn arbitrary(g: &mut Gen) -> ServerAuthResponse {
|
||||
let success = bool::arbitrary(g);
|
||||
ServerAuthResponse { success }
|
||||
}
|
||||
}
|
||||
|
||||
standard_roundtrip!(server_auth_response, ServerAuthResponse);
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user