Repository navigation
Split the grab-bag test files along their modules - #93
Merged
Merged
Conversation
test_server_roles.cpp's ServerGroups suite gets its own file and its disconnect and trace tests join the raw-client file, with the raw-client role helpers in raw_roles.h. The transport's URL and errno tables leave the loopback file, the in-process players' rig moves to players_rig.h, and the run view, scheduled updates and source feed suites get their own files. Group's tests move out of the audio workers file into test_group_internals.cpp. Every test keeps its name and label.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no blocking issues in the mechanical relocations, helper linkage, or build registration; tests were not run.
0 open findings
What changed in this PR
Reorganizes the server library's tests by module, addressing #45 without changing production code.
Changes:
- Moves existing suites into focused test files, preserving names and realtime labels.
- Extracts shared raw-client helpers and the player test harness.
- Updates CMake registration, private-access flags, and helper documentation.
| File | Description |
|---|---|
| tests/test_transport.cpp | Retains loopback and write-invariant tests. |
| tests/test_transport_url.cpp | Receives URL and socket-error tests. |
| tests/test_source_feed.cpp | Receives SourceFeed tests. |
| tests/test_source_decoder.cpp | Retains decoder tests. |
| tests/test_server_roles.cpp | Retains approval and role tests. |
| tests/test_server_raw_client.cpp | Receives disconnect and write-trace tests. |
| tests/test_server_players.cpp | Uses the extracted player harness. |
| tests/test_server_groups.cpp | Receives server group tests. |
| tests/test_scheduled_updates.cpp | Receives color scheduling tests. |
| tests/test_sched_run_view.cpp | Receives run-view tests. |
| tests/test_sched_admission.cpp | Retains admission tests. |
| tests/test_group_internals.cpp | Receives group lifecycle and stall tests. |
| tests/test_colors.cpp | Retains color calculation tests. |
| tests/test_audio_workers_internals.cpp | Retains worker shutdown tests. |
| tests/raw_roles.h | Houses shared raw-client role helpers. |
| tests/players_rig.h | Houses the player harness and assertions. |
| tests/CMakeLists.txt | Registers new files and private-access flags. |
| CLAUDE.md | Documents the extracted helper headers. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
Splits the grab-bag test files so each module's tests live in the module's own file. Every test keeps its name and its
realtimelabel, and the test count is unchanged (829 CTest tests, 68 realtime).Change
test_server_roles.cpp: ServerGroups moves to the newtest_server_groups.cpp. ServerDisconnect and ServerTrace jointest_server_raw_client.cpp(goodbyes, and the trace of completed writes). Approval, the controller and metadata roles, and the in-process role tests stay. The raw-client role helpers they share (hello(),player_state(),connect(),next()and the rest) move to the newtests/raw_roles.h.test_transport.cpp: the pure TransportUrl and TransportErrno tables (transport_url.cpp's functions) move totest_transport_url.cpp. The loopback and write-invariant tests stay.test_server_players.cpp: its rig (the segments and feed,Player,StreamTrace, the output decode, the expect_* checks andRig) moves totests/players_rig.h.test_sched_run_view.cpp, ColorSchedule (ScheduledUpdates) totest_scheduled_updates.cppand SourceFeed totest_source_feed.cpp.test_audio_workers_internals.cpptotest_group_internals.cpp. The-fno-access-controlreason and thegroup_job.hparagraph move with them. Every Group test reaches private members, so there is no publictest_group.cppyet; the new file is the_internalsone.client_clock_ususing is dropped, and<cstddef>is added wheresize_twas used without it.Tests
The change adds no tests; test bodies moved verbatim. Before and after,
--gtest_list_testsgives the same set of names.Closes #45