Skip to content

test(lass): add LASS unit tests to ctest - #200

Merged
TonyChai4 merged 2 commits into
mainfrom
test/lass-unit-tests
Oct 6, 2026
Merged

TonyChai4 merged 2 commits into
mainfrom
test/lass-unit-tests

Conversation

@TonyChai4

Copy link
Copy Markdown
Collaborator

Adds the first non-UI test suite to CI: a small LASS unit test executable, registered with ctest as LASS.UnitTests. It's only built when BUILD_TESTING is on, so normal builds and app startup are unaffected.

Since #193, CI runs ctest on Linux, Windows and macOS, so these run on every PR automatically with no workflow changes.

What it covers (10 small checks, aimed at common and crash-prone mistakes):

The regression tests were each confirmed to fail against the pre-fix code and to pass with the fixes.

🤖 Generated with Claude Code

TonyChai4 and others added 2 commits October 6, 2026 17:37
Adds a small LASS test executable (registered as LASS.UnitTests, only
built when BUILD_TESTING is on) covering common and crash-prone cases:
MultiPan/Reverb copy ownership, Sound detune validation and invalid
partial counts, Spatializer output, Envelope interpolation, MarkovModel
sampling/invalid states, and Pan with one or three channels.

Several of these are regression tests for the MarkovModel, Sound and
Pan fixes from #191. Since #193, CI runs ctest on Linux, Windows and
macOS, so these now run on every PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each test now runs through a small runTest() wrapper that:
- prefixes every failure message with the name of the test it came from,
- treats an unexpected exception as a failure of that test only, so the
  remaining tests still run instead of the whole program stopping,
- prints "RUN <name>" before each test, so if one crashes outright the
  last RUN line in the CI log names it,
- ends with a list of exactly which tests failed.

This keeps LASS.UnitTests a single ctest entry while making a red CI
check point straight at the specific broken test(s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TonyChai4
TonyChai4 merged commit 7b73e89 into main Oct 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant