Skip to content

chore: add Rust unit tests for audio modules - #79

Merged
akonopcz merged 3 commits into
developfrom
chore/rust-unit-tests
Dec 29, 2025
Merged

chore: add Rust unit tests for audio modules#79
akonopcz merged 3 commits into
developfrom
chore/rust-unit-tests

Conversation

@akonopcz

Copy link
Copy Markdown
Owner

Summary

  • Add 18 unit tests for AudioError Display trait (all 15 variants) and From/Into conversions
  • Add 10 unit tests for decode.rs covering MP3, OGG, M4A formats
  • Enable symphonia aac feature for M4A codec support
  • Add Debug derive to AudioData struct

Test Results

  • New tests: 28
  • Total Rust tests: 154 (145 unit + 9 integration)
  • Coverage: 52.94% (above 45% threshold)

Test plan

  • cargo test passes all 154 tests
  • cargo llvm-cov --fail-under-lines 45 passes
  • No compiler warnings

Related to #77

Problem:
- AudioError and decode.rs modules lacked unit tests
- M4A decoding failed due to missing AAC codec feature

Solution:
- Add 18 tests for AudioError Display/Conversion traits
- Add 10 tests for decode.rs (MP3, OGG, M4A formats)
- Enable symphonia AAC feature for M4A support
- Add Debug derive to AudioData for test assertions
@akonopcz akonopcz added the chore Maintenance tasks, dependency updates, build process changes. label Dec 29, 2025
- Generate JUnit XML report in CI for test analytics
- Upload test results to Codecov after test run
@akonopcz akonopcz self-assigned this Dec 29, 2025
@akonopcz akonopcz added this to the Alpha Stability milestone Dec 29, 2025
@akonopcz akonopcz linked an issue Dec 29, 2025 that may be closed by this pull request
4 tasks
@akonopcz
akonopcz merged commit e5fa7e1 into develop Dec 29, 2025
5 checks passed
@akonopcz
akonopcz deleted the chore/rust-unit-tests branch December 29, 2025 19:06
@akonopcz akonopcz added developer-tools Developer experience, tooling, debugging debugging labels Dec 29, 2025
@codecov

codecov Bot commented Dec 29, 2025

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance tasks, dependency updates, build process changes. developer-tools Developer experience, tooling, debugging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Rust unit test coverage (cache, settings, hotkeys)

1 participant