Add basic unit tests for MainWindow#1825
Draft
ddennedy wants to merge 3 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an initial CTest/QtTest-based harness to exercise basic MainWindow invariants, and refactors the build so the application’s compilation units can be reused by test executables.
Changes:
- Introduces a QtTest-based
TestMainWindowtest binary and registers it with CTest (offscreen platform). - Adds a top-level
tests/CMake subtree and enables CTest integration. - Refactors
src/CMakeLists.txtto build core sources as anOBJECTlibrary (shotcut_objects) and links theshotcutexecutable (and tests) against it.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
tests/mainwindow/mainwindowtest.cpp |
Adds QtTest cases covering basic MainWindow state, singleton access, action registration, and a profileChanged signal check. |
tests/mainwindow/CMakeLists.txt |
Builds and registers test_mainwindow with CTest and sets QT_QPA_PLATFORM=offscreen. |
tests/CMakeLists.txt |
Adds the mainwindow tests subdirectory. |
src/CMakeLists.txt |
Splits app sources into shotcut_objects and links shotcut against it to enable reuse by tests. |
CMakeLists.txt |
Enables testing and adds the tests/ subdirectory at the top level. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
No description provided.