| 1 |
#![cfg(feature = "derive")] |
| 2 |
// Various structs/fields that we are deriving `Arbitrary` for aren't actually |
| 3 |
// used except to show off the derive. |
| 4 |
#![allow(dead_code)] |
| 5 |
|
| 6 |
// Regression test for ensuring the derives work without Arbitrary being imported |
| 7 |
|
| 8 |
#[derive(arbitrary::Arbitrary, Clone, Debug)] |
| 9 |
pub struct Struct { |
| 10 |
x: u8, |
| 11 |
y: u8, |
| 12 |
} |
| 13 |
|
| 14 |
#[derive(arbitrary::Arbitrary, Clone, Debug)] |
| 15 |
pub struct Tuple(u8); |
| 16 |
|
| 17 |
#[derive(arbitrary::Arbitrary, Clone, Debug)] |
| 18 |
pub struct Unit(u8); |
| 19 |
|
| 20 |
#[derive(arbitrary::Arbitrary, Clone, Debug)] |
| 21 |
pub enum Enum { |
| 22 |
X(u8), |
| 23 |
Y(u8), |
| 24 |
} |
| 25 |
|
| 26 |
#[derive(arbitrary::Arbitrary, Clone, Debug)] |
| 27 |
struct EndingInVec(u8, bool, u32, Vec<u16>); |
| 28 |
|
| 29 |
#[derive(arbitrary::Arbitrary, Debug)] |
| 30 |
struct Generic<T> { |
| 31 |
inner: T, |
| 32 |
} |