Skip to content

Commit

Permalink
Fix capability tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed May 22, 2024
1 parent 6518a5c commit 9b6bba2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/vector/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,11 @@ mod tests {
fn test_layer_try_get_extent() {
let ds = Dataset::open(fixture("roads.geojson")).unwrap();
let layer = ds.layer(0).unwrap();
assert!(layer.try_get_extent().unwrap().is_none());
if cfg!(any(major_ge_4, all(major_is_3, minor_ge_9))) {
assert!(layer.try_get_extent().unwrap().is_some());
} else {
assert!(layer.try_get_extent().unwrap().is_none());
}
}

#[test]
Expand All @@ -839,7 +843,11 @@ mod tests {

assert!(!layer.has_capability(OLCFastSpatialFilter));
assert!(layer.has_capability(OLCFastFeatureCount));
assert!(!layer.has_capability(OLCFastGetExtent));
if cfg!(any(major_ge_4, all(major_is_3, minor_ge_9))) {
assert!(layer.has_capability(OLCFastGetExtent));
} else {
assert!(!layer.has_capability(OLCFastGetExtent));
}
assert!(layer.has_capability(OLCRandomRead));
assert!(layer.has_capability(OLCStringsAsUTF8));
}
Expand Down

0 comments on commit 9b6bba2

Please sign in to comment.