Skip to content

Commit

Permalink
Restrict test::attribute::arbitrary to implemented types
Browse files Browse the repository at this point in the history
  • Loading branch information
rroelke committed Mar 22, 2024
1 parent 71479f0 commit a2ca3a3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tiledb/test/src/attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ pub fn arbitrary_name() -> impl Strategy<Value = String> {
}

pub fn arbitrary(context: &Context) -> impl Strategy<Value = Attribute> {
(arbitrary_name(), crate::datatype::arbitrary()).prop_map(|(name, dt)| {
AttributeBuilder::new(context, name.as_ref(), dt)
.expect("Error building attribute")
.build()
})
(arbitrary_name(), crate::datatype::arbitrary_implemented()).prop_map(
|(name, dt)| {
AttributeBuilder::new(context, name.as_ref(), dt)
.expect("Error building attribute")
.build()
},
)
}

#[cfg(test)]
Expand Down

0 comments on commit a2ca3a3

Please sign in to comment.