Format a single integer per fuzz call
This commit is contained in:
parent
5638af52e1
commit
6f99ca58e1
|
@ -19,15 +19,9 @@ enum IntegerInput {
|
|||
U128(u128),
|
||||
}
|
||||
|
||||
#[derive(Arbitrary, Debug)]
|
||||
struct Inputs {
|
||||
inputs: Vec<IntegerInput>,
|
||||
}
|
||||
|
||||
fuzz_target!(|input: Inputs| {
|
||||
fuzz_target!(|input: IntegerInput| {
|
||||
let mut buffer = itoa::Buffer::new();
|
||||
for input_integer in input.inputs {
|
||||
match input_integer {
|
||||
match input {
|
||||
IntegerInput::I8(val) => buffer.format(val),
|
||||
IntegerInput::U8(val) => buffer.format(val),
|
||||
IntegerInput::I16(val) => buffer.format(val),
|
||||
|
@ -41,5 +35,4 @@ fuzz_target!(|input: Inputs| {
|
|||
IntegerInput::I128(val) => buffer.format(val),
|
||||
IntegerInput::U128(val) => buffer.format(val),
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue