fix: resolve all Rust test compile warnings without suppression
Remove unused imports and a dead test helper, and strengthen tests that held unused bindings/fields so the values are actually exercised: - drop unused imports (HttpConfig, MediaType, std::io::Write) - remove unused TestEventEmitter::clear helper - replace meaningless size_of asserts with real empty-manager checks - assert on MockTrack.name in sorting tests
This commit is contained in:
@@ -1796,6 +1796,7 @@ mod tests {
|
||||
// Test finding track 1 (should be index 0)
|
||||
let index1 = tracks.iter().position(|t| t.id == "track1");
|
||||
assert_eq!(index1, Some(0), "Track 1 should be at index 0");
|
||||
assert_eq!(tracks[0].name, "Song 1", "Track at index 0 should carry its name");
|
||||
|
||||
// Test finding track 3 (should be index 2)
|
||||
let index3 = tracks.iter().position(|t| t.id == "track3");
|
||||
@@ -1869,6 +1870,7 @@ mod tests {
|
||||
|
||||
// Verify all tracks are in correct order
|
||||
assert_eq!(tracks[0].id, "id1");
|
||||
assert_eq!(tracks[0].name, "Track 1", "Sorted track should retain its name");
|
||||
assert_eq!(tracks[1].id, "id2");
|
||||
assert_eq!(tracks[2].id, "id3");
|
||||
assert_eq!(tracks[3].id, "id4");
|
||||
|
||||
Reference in New Issue
Block a user