infra: individual test executables - #1212
Merged
Carson Radtke (carsonRadtke) merged 12 commits intoDec 5, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the GSL test infrastructure by separating tests from a single monolithic executable into individual test executables for each component. This change improves development workflow by enabling targeted testing of specific components.
- Splits the single
gsl_testsexecutable into 14 individual test executables, one per test source file - Simplifies MSVC version checks in span tests to focus on C++14 compatibility instead of specific compiler versions
- Maintains the same test coverage while improving modularity and development experience
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/CMakeLists.txt | Refactors build system to create individual executables for each test source file using a foreach loop |
| tests/span_tests.cpp | Simplifies MSVC version checks by removing specific version numbers and focusing on C++14 standard |
Carson Radtke (carsonRadtke)
force-pushed
the
carsonradtke/individual-tests
branch
from
October 1, 2025 16:05
dbcffab to
1bb885c
Compare
We used have tests contained in a single executable. This was fine for testing, but it would be more convient to separate tests into indivudal modules so targeted changes could have targeted tests. This change associates each test file with its own executable. We now have 14 tests for GSL each of which testing a different component.
thanks copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Carson Radtke (carsonRadtke)
force-pushed
the
carsonradtke/individual-tests
branch
from
December 4, 2025 21:38
1bb885c to
731955d
Compare
Carson Radtke (carsonRadtke)
requested review from
Copilot and
Gabriel Dos Reis (gdr-at-ms)
December 5, 2025 15:51
Copilot started reviewing on behalf of
Carson Radtke (carsonRadtke)
December 5, 2025 15:52
View session
Gabriel Dos Reis (gdr-at-ms)
approved these changes
Dec 5, 2025
Contributor
|
Carson Radtke (@carsonRadtke) I've opened a new pull request, #1227, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Use file globbing for test sources instead of manual list Replace the manually maintained list of test sources with file(GLOB) to automatically discover all .cpp files in the tests directory, excluding no_exception_ensure_tests.cpp which needs special compilation flags. This approach: - Automatically picks up new test files without CMake updates - Still correctly excludes no_exception_ensure_tests.cpp - Maintains the same test build configuration - Works with both C++14 and C++20 Co-authored-by: carsonRadtke <10507970+carsonRadtke@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: carsonRadtke <10507970+carsonRadtke@users.noreply.github.com>
Carson Radtke (carsonRadtke)
requested a review
from Gabriel Dos Reis (gdr-at-ms)
December 5, 2025 18:16
Gabriel Dos Reis (gdr-at-ms)
approved these changes
Dec 5, 2025
Carson Radtke (carsonRadtke)
deleted the
carsonradtke/individual-tests
branch
December 5, 2025 20:24
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.
We used have tests contained in a single executable. This was fine for testing, but it would be more convient to separate tests into indivudal modules so targeted changes could have targeted tests.
This change associates each test file with its own executable. We now have 14 tests for GSL each of which testing a different component.