Skip to content

Commit

Permalink
Allow using the oneof macro in repr tests
Browse files Browse the repository at this point in the history
The original reason this was banned doesn't apply here, and we can't use
the suggested alternative for lifetimey reasons.
  • Loading branch information
bkirwi committed Sep 13, 2024
1 parent cda857c commit c2d9f70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/expr/src/scalar/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8672,6 +8672,7 @@ mod test {

let interesting_strs: Vec<Datum<'static>> =
ScalarType::String.interesting_datums().collect();
#[allow(clippy::disallowed_macros)]
let str_datums = prop_oneof![
proptest::string::string_regex("[A-Z]{0,10}")
.expect("valid regex")
Expand All @@ -8681,6 +8682,7 @@ mod test {

let interesting_i32s: Vec<Datum<'static>> =
ScalarType::Int32.interesting_datums().collect();
#[allow(clippy::disallowed_macros)]
let i32_datums = prop_oneof![
any::<i32>().prop_map(Datum::from),
(0..interesting_i32s.len()).prop_map(|i| interesting_i32s[i]),
Expand Down

0 comments on commit c2d9f70

Please sign in to comment.