refactor(qconnect): extract test module into qconnect/tests.rs

Move the 37 unit tests (1044 lines, all #[cfg(test)] inside the old
mod tests {} block in mod.rs) into a dedicated tests.rs submodule.
mod.rs keeps only the declaration `#[cfg(test)] mod tests;`.

Test imports are unchanged — they still use `super::*` paths into the
focused submodules established in steps 2-9, which is exactly the
intended layout.

This concludes Alcance A of the qconnect refactor. Full layout:

  src-tauri/src/qconnect/
  ├── mod.rs              (1820 lines) — QconnectServiceState impl,
  │                                       glue, internal structs
  ├── types.rs            ( 273 lines) — wire types, request payloads
  ├── session.rs          ( 374 lines) — topology, renderer snapshots
  ├── queue_resolution.rs ( 481 lines) — cursors, indices, shuffle order
  ├── corebridge.rs       ( 566 lines) — apply_renderer_command,
  │                                       materialize, projection
  ├── track_loading.rs    ( 337 lines) — streaming, FLAC probe, dedup
  ├── event_sink.rs       ( 461 lines) — QconnectEventSink + dispatch
  ├── transport.rs        ( 386 lines) — credentials, device identity
  ├── commands.rs         ( 849 lines) — Tauri invoke handlers + report
  │                                       helpers
  └── tests.rs            (1044 lines) — 37 unit tests

From 6371 lines in 1 monolith → 7591 lines across 10 focused files
with clear responsibility boundaries. mod.rs went 6371 → 1820 (-71%).
Each submodule is independently navigable; visibility is constrained
via pub(super) so re-exports stay intentional. All 37 tests pass.

cc
This commit is contained in:
vicrodh committed 2026-04-27 17:30:08 -06:00
1 parent 7bd5562203
commit 49f56d563e
2 files changed
+1047 -1046

No files matched your search

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff