Add unit tests for ShortenWaveForFFTIfRequired#2608
Merged
Conversation
5cc8636 to
8d71c75
Compare
Copilot
AI
changed the title
[WIP] Fix various PSX issues based on review comments
Add unit tests for ShortenWaveForFFTIfRequired
Jan 27, 2026
Collaborator
|
@copilot Please resolve conflicts. |
Contributor
Author
Base automatically changed from
bugfix/2362-psx-support-multiple-selections
to
main
February 2, 2026 17:57
Co-authored-by: t-b <1185677+t-b@users.noreply.github.com>
a6c47d4 to
83dc390
Compare
t-b
approved these changes
Feb 2, 2026
There was a problem hiding this comment.
Pull request overview
Adds direct unit tests for ShortenWaveForFFTIfRequired, covering pass-through vs truncation behavior and related FFT-size expectations.
Changes:
- Adds pass-through tests for “already acceptable” sizes.
- Adds truncation tests for sizes with max prime factor > 1000, including content preservation checks.
- Adds tests intended to cover cache behavior and “good FFT size” results.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for opening a PR in MIES ✨!
here for the detailed explanation.
Description
The
ShortenWaveForFFTIfRequiredfunction lacked direct unit tests despite implementing non-trivial logic: prime-factor analysis, cachedGetGoodFFTSizeslookup, and wave truncation when max prime factor exceeds 1000.Added four test functions to
UTF_Utils_Algorithm.ipf:Pass-through behavior: Waves with good FFT sizes (only 2 and 3 as prime factors) return unchanged
Truncation logic: Waves with prime factors >1000 are truncated to nearest good FFT size
Cache mechanism: Validates
GetGoodFFTSizescachingResult validation: Truncated waves have max prime factor ≤1000
All tests follow existing patterns in the test suite using standard CHECK macros.
Merge Conflict Resolution
Resolved merge conflicts with the base branch
bugfix/2362-psx-support-multiple-selections:✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.