File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,7 @@ impl Encode<()> for PropId {
240240
241241#[ cfg( test) ]
242242mod tests {
243+ use proptest:: { prelude:: any_with, sample:: size_range} ;
243244 use test_strategy:: proptest;
244245
245246 use super :: * ;
@@ -250,7 +251,18 @@ mod tests {
250251
251252 #[ proptest]
252253 fn generalized_tx_from_bytes_to_bytes_test (
253- vote_type : Vec < u8 > , votes : Vec < PropVote > , voter_data : Vec < u8 > ,
254+ vote_type : Vec < u8 > ,
255+ // generates a votes in range from 1 to 10, and choices in range from 1 to 10
256+ #[ strategy( any_with:: <Vec <PropVote >>( (
257+ size_range( 1 ..10usize ) ,
258+ (
259+ ( size_range( 1 ..10usize ) , Default :: default ( ) ) ,
260+ Default :: default ( ) ,
261+ Default :: default ( ) ,
262+ ) ,
263+ ) ) ) ]
264+ votes : Vec < PropVote > ,
265+ voter_data : Vec < u8 > ,
254266 ) {
255267 let generalized_tx = GeneralizedTx {
256268 tx_body : TxBody {
You can’t perform that action at this time.
0 commit comments