Parcourir la source

GPU: rename the second test module in host.rs so the tests compile

cargo test --workspace does not compile on main: host.rs declares
#[cfg(test)] mod tests twice, once near the top for the warp adapter test and
once at the end for the Batch::texture_due tests, so rustc rejects the crate
with E0428 before running anything:

    error[E0428]: the name 	ests is defined multiple times
    --> crates\victory-gpu\src\host.rs:1974:1

The second block only touches Batch, so it becomes mod batch and keeps its
two tests. cargo test -p victory-gpu --lib goes from "could not compile" to
43 passed, 0 failed, 1 ignored, and cargo test --workspace compiles again.
Nothing else changes: one line, no test bodies touched.
LUIS LARIOS il y a 3 jours
Parent
commit
7102a4989c
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      crates/victory-gpu/src/host.rs

+ 1 - 1
crates/victory-gpu/src/host.rs

@@ -1971,7 +1971,7 @@ fn pump() {
 }
 
 #[cfg(test)]
-mod tests {
+mod batch {   // Batch::texture_due lives here; `mod tests` is already taken at the top of this file
     use super::Batch;
     use std::sync::Arc;