Skip to content

Commit

Permalink
Merge #329
Browse files Browse the repository at this point in the history
329: Drop `trybuild` test r=jdroenner a=lnicola

- [x] I agree to follow the project's [code of conduct](https://github.com/georust/gdal/blob/master/CODE_OF_CONDUCT.md).
- [ ] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.
---

Follow-up to #236
Closes #312

`trybuild` sounds nice, however:

 - it doesn't work (out of the box) with multiple compiler versions, so it breaks when upgrading compilers: #234
 - when testing with `--all-features`, it causes the code to be rebuilt twice
 - I've seen it give some weird errors in unusual circumstances (under `gdb`, maybe?)
 - it's completely broken for `@metasim` (#312), but not on CI, see also #312 (comment)
 - 1.5 years later, we still only have one test

Co-authored-by: Laurențiu Nicola <[email protected]>
  • Loading branch information
bors[bot] and lnicola authored Oct 31, 2022
2 parents 8c0ddd2 + 9e92c90 commit 194225e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 56 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ semver = "1.0"

[dev-dependencies]
tempfile = "3.3"
trybuild = "1.0"

[workspace]
members = ["gdal-sys"]
Expand Down
19 changes: 0 additions & 19 deletions src/vector/vector_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -804,25 +804,6 @@ mod tests {
});
}

#[test]
fn test_features_aliasing_compile_fail() {
let t = trybuild::TestCases::new(); // A compilation test that should fail.
t.compile_fail("tests/compile-tests/01-features-aliasing-errors.rs");
}

// It tries to iterate over a layer's features, while
// also trying to read the layer's definition. The
// features iterator borrows layer as a mutable ref as
// it increments the internal state of the layer.
//
// fn test_features_mut_lifetime_enforce() {
// with_layer("roads.geojson", |mut layer| {
// for _ in layer.features() {
// let _ = layer.defn();
// }
// });
// }

#[test]
fn test_set_attribute_filter() {
with_layer("roads.geojson", |mut layer| {
Expand Down
12 changes: 0 additions & 12 deletions tests/compile-tests/01-features-aliasing-errors.rs

This file was deleted.

10 changes: 0 additions & 10 deletions tests/compile-tests/01-features-aliasing-errors.stderr

This file was deleted.

14 changes: 0 additions & 14 deletions tests/compile-tests/utils.rs

This file was deleted.

0 comments on commit 194225e

Please sign in to comment.