refactor(qconnect): fix test module imports broken by submodule split

Steps 4-8 moved items into focused submodules but only verified `cargo
check` (lib only) — tests under #[cfg(test)] in mod.rs continued
referring to items via plain `super::FunctionName`, which only resolved
when the items were still in mod.rs.

This commit re-paths the test imports to point at their actual
submodules:

- decode_hex_channel, parse_subscribe_channels, default_qconnect_device_info
  → super::transport::*
- find_unique_renderer_id, refresh_local_renderer_id,
  QconnectFileAudioQualitySnapshot → super::session::*
- resolve_controller_queue_item_from_snapshots,
  resolve_queue_item_ids_from_queue_state, QconnectRemoteSkipDirection,
  resolve_core_shuffle_order, QconnectControllerQueueItemResolution
  → super::queue_resolution::*
- build_session_renderer_snapshot → super::session::*
- should_reload_remote_track → super::track_loading::*
- queue_state_needs_materialization → super::corebridge::*

Promoted decode_hex_channel and parse_subscribe_channels to pub(super)
in transport.rs, and should_reload_remote_track to pub(super) in
track_loading.rs so the tests can reach them across the submodule
boundary.

All 37 qconnect tests pass.

cc
This commit is contained in:
vicrodh committed 2026-04-27 17:04:08 -06:00
1 parent c9285a33e9
commit b4a32aec5d
3 files changed
+28 -21

No files matched your search

+2 -2
View File
@@ -351,14 +351,14 @@ fn normalize_opt_string(value: Option<String>) -> Option<String> {
})
}
fn parse_subscribe_channels(items: Vec<String>) -> Result<Vec<Vec<u8>>, String> {
pub(super) fn parse_subscribe_channels(items: Vec<String>) -> Result<Vec<Vec<u8>>, String> {
items
.into_iter()
.map(|item| decode_hex_channel(&item))
.collect()
}
fn decode_hex_channel(raw: &str) -> Result<Vec<u8>, String> {
pub(super) fn decode_hex_channel(raw: &str) -> Result<Vec<u8>, String> {
let normalized = raw.trim().trim_start_matches("0x").trim_start_matches("0X");
if normalized.is_empty() {
return Err("empty subscribe channel hex value".to_string());