whitebox-tools
whitebox-tools copied to clipboard
cargo test fails against whitebox-tools 2.0.0
Trying to run tests during a build on Arch Linux with:
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
But if fails with the following:
==> Starting check()...
Compiling autocfg v1.1.0
Compiling libc v0.2.119
Compiling libm v0.2.2
Compiling rand_core v0.4.2
Compiling proc-macro2 v1.0.36
Compiling cfg-if v1.0.0
Compiling unicode-xid v0.2.2
Compiling syn v1.0.86
Compiling ucd-trie v0.1.3
Compiling getrandom v0.1.16
Compiling typenum v1.15.0
Compiling serde_derive v1.0.136
Compiling serde v1.0.136
Compiling ppv-lite86 v0.2.16
Compiling serde_json v1.0.79
Compiling byteorder v1.4.3
Compiling rawpointer v0.2.1
Compiling itoa v1.0.1
Compiling pdqselect v0.1.1
Compiling ryu v1.0.9
Compiling pkg-config v0.3.24
Compiling cc v1.0.73
Compiling crc32fast v1.3.2
Compiling log v0.4.14
Compiling adler v1.0.2
Compiling alloc-no-stdlib v2.0.3
Compiling adler32 v1.2.0
Compiling lzw v0.10.0
Compiling uuid v0.8.2
Compiling podio v0.1.7
Compiling rand_core v0.3.1
Compiling rand_jitter v0.1.4
Compiling pest v2.1.3
Compiling autocfg v0.1.8
Compiling matrixmultiply v0.2.4
Compiling num-traits v0.2.14
Compiling num-integer v0.1.44
Compiling num-complex v0.2.4
Compiling num-rational v0.2.4
Compiling num-bigint v0.4.3
Compiling num-rational v0.4.0
Compiling num-iter v0.1.42
Compiling miniz_oxide v0.4.4
Compiling alloc-stdlib v0.2.1
Compiling miniz_oxide v0.3.7
Compiling rand_isaac v0.1.1
Compiling rand_xorshift v0.1.1
Compiling rand_hc v0.1.0
Compiling rand_pcg v0.1.2
Compiling rand_chacha v0.1.1
Compiling rand v0.6.5
Compiling brotli-decompressor v2.3.2
Compiling semver-parser v0.10.2
Compiling quote v1.0.15
Compiling time v0.1.44
Compiling rand_os v0.1.3
Compiling num_cpus v1.13.1
Compiling bzip2-sys v0.1.11+1.0.8
Compiling semver v0.11.0
Compiling rand_core v0.5.1
Compiling generic-array v0.12.4
Compiling brotli v3.3.3
Compiling flate2 v1.0.22
Compiling msdos_time v0.1.6
Compiling rustc_version v0.3.3
Compiling approx v0.3.2
Compiling rstar v0.7.1
Compiling num-complex v0.4.0
Compiling laz v0.6.1
Compiling rand_chacha v0.2.2
Compiling rand_pcg v0.2.1
Compiling chrono v0.4.19
Compiling whitebox_common v1.5.0 (/build/whitebox-tools/src/whitebox-tools-2.0.0/whitebox-common)
Compiling alga v0.9.3
Compiling rand v0.7.3
Compiling bzip2 v0.3.3
Compiling zip v0.3.3
Compiling nalgebra v0.18.1
Compiling num v0.4.0
Compiling thiserror-impl v1.0.30
Compiling thiserror v1.0.30
Compiling las v0.7.5
Compiling whitebox_raster v1.5.0 (/build/whitebox-tools/src/whitebox-tools-2.0.0/whitebox-raster)
Compiling whitebox_vector v1.5.0 (/build/whitebox-tools/src/whitebox-tools-2.0.0/whitebox-vector)
warning: field is never read: `unused1`
--> whitebox-vector/src/shapefile/mod.rs:32:5
|
32 | unused1: i32, // BigEndian
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: field is never read: `unused2`
--> whitebox-vector/src/shapefile/mod.rs:33:5
|
33 | unused2: i32, // BigEndian
| ^^^^^^^^^^^^
warning: field is never read: `unused3`
--> whitebox-vector/src/shapefile/mod.rs:34:5
|
34 | unused3: i32, // BigEndian
| ^^^^^^^^^^^^
warning: field is never read: `unused4`
--> whitebox-vector/src/shapefile/mod.rs:35:5
|
35 | unused4: i32, // BigEndian
| ^^^^^^^^^^^^
warning: field is never read: `unused5`
--> whitebox-vector/src/shapefile/mod.rs:36:5
|
36 | unused5: i32, // BigEndian
| ^^^^^^^^^^^^
warning: `whitebox_vector` (lib) generated 5 warnings
Compiling whitebox_lidar v1.5.0 (/build/whitebox-tools/src/whitebox-tools-2.0.0/whitebox-lidar)
Finished test [unoptimized + debuginfo] target(s) in 29.00s
Doc-tests whitebox_common
running 9 tests
test src/algorithms/delaunay_triangulation.rs - algorithms::delaunay_triangulation (line 24) ... FAILED
test src/algorithms/delaunay_triangulation.rs - algorithms::delaunay_triangulation (line 19) ... FAILED
test src/algorithms/delaunay_triangulation.rs - algorithms::delaunay_triangulation (line 29) ... FAILED
test src/structures/fixed_radius_search.rs - structures::fixed_radius_search::FixedRadiusSearch3D (line 252) ... FAILED
test src/structures/fixed_radius_search.rs - structures::fixed_radius_search::FixedRadiusSearch2D (line 34) ... FAILED
test src/structures/array2d.rs - structures::array2d::Array2D<T>::new (line 39) ... FAILED
test src/structures/n_maximizer.rs - structures::n_maximizer::NMaximizer (line 14) ... FAILED
test src/structures/array2d.rs - structures::array2d::Array2D (line 14) ... FAILED
test src/structures/n_minimizer.rs - structures::n_minimizer::NMinimizer (line 14) ... FAILED
failures:
---- src/algorithms/delaunay_triangulation.rs - algorithms::delaunay_triangulation (line 24) stdout ----
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `half`
--> src/algorithms/delaunay_triangulation.rs:25:5
|
3 | The half-edges of triangle t are 3*t, 3*t + 1, and 3*t + 2.
| ^^^^ expected one of 8 possible tokens
error: mismatched closing delimiter: `}`
--> src/algorithms/delaunay_triangulation.rs:26:40
|
2 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_algorithms_delaunay_triangulation_rs_24_0() {
| - closing delimiter possibly meant for this
3 | The half-edges of triangle t are 3*t, 3*t + 1, and 3*t + 2.
4 | The triangle of half-edge id e is floor(e/3
| ^ unclosed delimiter
5 | } _doctest_main_src_algorithms_delaunay_triangulation_rs_24_0() }
| ^ mismatched closing delimiter
error: aborting due to 2 previous errors
Couldn't compile the test.
---- src/algorithms/delaunay_triangulation.rs - algorithms::delaunay_triangulation (line 19) stdout ----
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `returns`
--> src/algorithms/delaunay_triangulation.rs:20:23
|
3 | delaunay.triangles[e] returns the point id where the half-edge starts
| ^^^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator
error: aborting due to previous error
Couldn't compile the test.
---- src/algorithms/delaunay_triangulation.rs - algorithms::delaunay_triangulation (line 29) stdout ----
error: expected `;`, found keyword `let`
--> src/algorithms/delaunay_triangulation.rs:31:24
|
4 | use structures::Point2D
| ^ help: add `;` here
5 |
6 | let points = vec![
| --- unexpected token
error[E0432]: unresolved import `delaunator`
--> src/algorithms/delaunay_triangulation.rs:30:5
|
3 | use delaunator::triangulate;
| ^^^^^^^^^^ use of undeclared crate or module `delaunator`
error[E0432]: unresolved import `structures`
--> src/algorithms/delaunay_triangulation.rs:31:5
|
4 | use structures::Point2D
| ^^^^^^^^^^ help: a similar path exists: `whitebox_common::structures`
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0432`.
Couldn't compile the test.
---- src/structures/fixed_radius_search.rs - structures::fixed_radius_search::FixedRadiusSearch3D (line 252) stdout ----
error[E0433]: failed to resolve: use of undeclared type `DistanceMetric`
--> src/structures/fixed_radius_search.rs:253:45
|
3 | let mut frs = FixedRadiusSearch3D::new(5.0, DistanceMetric::SquaredEuclidean);
| ^^^^^^^^^^^^^^ use of undeclared type `DistanceMetric`
error[E0433]: failed to resolve: use of undeclared type `FixedRadiusSearch3D`
--> src/structures/fixed_radius_search.rs:253:15
|
3 | let mut frs = FixedRadiusSearch3D::new(5.0, DistanceMetric::SquaredEuclidean);
| ^^^^^^^^^^^^^^^^^^^ not found in this scope
|
help: consider importing this struct
|
2 | use whitebox_common::structures::FixedRadiusSearch3D;
|
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
---- src/structures/fixed_radius_search.rs - structures::fixed_radius_search::FixedRadiusSearch2D (line 34) stdout ----
error[E0433]: failed to resolve: use of undeclared type `DistanceMetric`
--> src/structures/fixed_radius_search.rs:35:45
|
3 | let mut frs = FixedRadiusSearch2D::new(5.0, DistanceMetric::SquaredEuclidean);
| ^^^^^^^^^^^^^^ use of undeclared type `DistanceMetric`
error[E0433]: failed to resolve: use of undeclared type `FixedRadiusSearch2D`
--> src/structures/fixed_radius_search.rs:35:15
|
3 | let mut frs = FixedRadiusSearch2D::new(5.0, DistanceMetric::SquaredEuclidean);
| ^^^^^^^^^^^^^^^^^^^ not found in this scope
|
help: consider importing this struct
|
2 | use whitebox_common::structures::FixedRadiusSearch2D;
|
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
---- src/structures/array2d.rs - structures::array2d::Array2D<T>::new (line 39) stdout ----
error[E0412]: cannot find type `Array2D` in this scope
--> src/structures/array2d.rs:44:12
|
7 | let mut x: Array2D<f64> = Array2D::new(rows, columns, initial_value, nodata_value)?;
| ^^^^^^^ not found in this scope
|
help: consider importing this struct
|
2 | use whitebox_common::structures::Array2D;
|
error[E0433]: failed to resolve: use of undeclared type `Array2D`
--> src/structures/array2d.rs:44:27
|
7 | let mut x: Array2D<f64> = Array2D::new(rows, columns, initial_value, nodata_value)?;
| ^^^^^^^ not found in this scope
|
help: consider importing this struct
|
2 | use whitebox_common::structures::Array2D;
|
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
--> src/structures/array2d.rs:44:83
|
2 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_structures_array2d_rs_39_0() {
| ______________________________________-
3 | | let rows = 100;
4 | | let columns = 500;
5 | | let initial_value = 0f64;
6 | | let nodata_value = -999f64;
7 | | let mut x: Array2D<f64> = Array2D::new(rows, columns, initial_value, nodata_value)?;
| | ^ cannot use the `?` operator in a function that returns `()`
8 | | } _doctest_main_src_structures_array2d_rs_39_0() }
| |_- this function should return `Result` or `Option` to accept `?`
|
= help: the trait `FromResidual<_>` is not implemented for `()`
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0277, E0412, E0433.
For more information about an error, try `rustc --explain E0277`.
Couldn't compile the test.
---- src/structures/n_maximizer.rs - structures::n_maximizer::NMaximizer (line 14) stdout ----
error[E0433]: failed to resolve: use of undeclared type `NMaximizer`
--> src/structures/n_maximizer.rs:15:17
|
3 | let mut highs = NMaximizer::new(4);
| ^^^^^^^^^^ not found in this scope
|
help: consider importing this struct
|
2 | use whitebox_common::structures::NMaximizer;
|
error: aborting due to previous error
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
---- src/structures/array2d.rs - structures::array2d::Array2D (line 14) stdout ----
error[E0412]: cannot find type `Array2D` in this scope
--> src/structures/array2d.rs:19:12
|
7 | let mut x: Array2D<f64> = Array2D::new(rows, columns, initial_value, nodata_value)?;
| ^^^^^^^ not found in this scope
|
help: consider importing this struct
|
2 | use whitebox_common::structures::Array2D;
|
error[E0433]: failed to resolve: use of undeclared type `Array2D`
--> src/structures/array2d.rs:19:27
|
7 | let mut x: Array2D<f64> = Array2D::new(rows, columns, initial_value, nodata_value)?;
| ^^^^^^^ not found in this scope
|
help: consider importing this struct
|
2 | use whitebox_common::structures::Array2D;
|
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
--> src/structures/array2d.rs:19:83
|
2 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_structures_array2d_rs_14_0() {
| ______________________________________-
3 | | let rows = 100;
4 | | let columns = 500;
5 | | let initial_value = 0f64;
6 | | let nodata_value = -999f64;
7 | | let mut x: Array2D<f64> = Array2D::new(rows, columns, initial_value, nodata_value)?;
| | ^ cannot use the `?` operator in a function that returns `()`
8 | | let cell_val = x.get_value(50, 100);
9 | | x.set_value(50, 100, 1f64);
10 | | } _doctest_main_src_structures_array2d_rs_14_0() }
| |_- this function should return `Result` or `Option` to accept `?`
|
= help: the trait `FromResidual<_>` is not implemented for `()`
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0277, E0412, E0433.
For more information about an error, try `rustc --explain E0277`.
Couldn't compile the test.
---- src/structures/n_minimizer.rs - structures::n_minimizer::NMinimizer (line 14) stdout ----
error[E0433]: failed to resolve: use of undeclared type `NMinimizer`
--> src/structures/n_minimizer.rs:15:16
|
3 | let mut lows = NMinimizer::new(4);
| ^^^^^^^^^^ not found in this scope
|
help: consider importing this struct
|
2 | use whitebox_common::structures::NMinimizer;
|
error: aborting due to previous error
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
failures:
src/algorithms/delaunay_triangulation.rs - algorithms::delaunay_triangulation (line 19)
src/algorithms/delaunay_triangulation.rs - algorithms::delaunay_triangulation (line 24)
src/algorithms/delaunay_triangulation.rs - algorithms::delaunay_triangulation (line 29)
src/structures/array2d.rs - structures::array2d::Array2D (line 14)
src/structures/array2d.rs - structures::array2d::Array2D<T>::new (line 39)
src/structures/fixed_radius_search.rs - structures::fixed_radius_search::FixedRadiusSearch2D (line 34)
src/structures/fixed_radius_search.rs - structures::fixed_radius_search::FixedRadiusSearch3D (line 252)
src/structures/n_maximizer.rs - structures::n_maximizer::NMaximizer (line 14)
src/structures/n_minimizer.rs - structures::n_minimizer::NMinimizer (line 14)
test result: FAILED. 0 passed; 9 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s
error: test failed, to rerun pass '--doc'