db::test::TestData variable length
This commit is contained in:
parent
78b319e41a
commit
5f4fc35b71
@ -321,10 +321,14 @@ mod test {
|
||||
#[derive(bincode::Encode, bincode::Decode, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
struct TestData {
|
||||
num: u64,
|
||||
test: String,
|
||||
}
|
||||
|
||||
fn gen_data(count: usize) -> impl Iterator<Item = TestData> {
|
||||
(0..count).into_iter().map(|i| TestData { num: i as u64 })
|
||||
(0..count).into_iter().map(|i| TestData {
|
||||
num: i as u64,
|
||||
test: "test".repeat(i),
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user