-
-
Notifications
You must be signed in to change notification settings - Fork 623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for mocking to tests & test X11 struts #2115
Draft
Caellian
wants to merge
6
commits into
main
Choose a base branch
from
dev/test-x11-struts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
github-actions
bot
added
sources
PR modifies project sources
tests
related to project tests
build system
related to build system (CMake) and/or building process/assumptions
labels
Dec 9, 2024
✅ Deploy Preview for conkyweb ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Caellian
force-pushed
the
dev/test-x11-struts
branch
from
December 9, 2024 06:15
7ac6888
to
055d295
Compare
Caellian
force-pushed
the
dev/test-x11-struts
branch
21 times, most recently
from
December 9, 2024 08:33
2b47530
to
1d3f730
Compare
Caellian
force-pushed
the
dev/test-x11-struts
branch
5 times, most recently
from
December 9, 2024 08:48
513dc98
to
2f41bf3
Compare
- Fix compile issues. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Caellian
force-pushed
the
dev/test-x11-struts
branch
4 times, most recently
from
December 9, 2024 18:20
ad5a655
to
14193db
Compare
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Caellian
force-pushed
the
dev/test-x11-struts
branch
from
December 9, 2024 18:21
14193db
to
384822e
Compare
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Caellian
force-pushed
the
dev/test-x11-struts
branch
from
December 10, 2024 03:31
f23ca06
to
1784a59
Compare
Caellian
commented
Dec 16, 2024
void set_struts(int); | ||
void set_struts(alignment); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I kept this line like this for a reason, it previously caused compilation to fail because
alignment
wasn't available to some file (wayland?) that uses it. Note to self to check before merge.
- Split apart some of existing X11 functions so they can be unit tested. - Improvements of testing code. Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build system
related to build system (CMake) and/or building process/assumptions
display: x11
related to X11 backend
sources
PR modifies project sources
tests
related to project tests
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.
This PR adds some very basic mocking capabilities to tests.
The goal of this PR is to test values set by
set_struts
.Mocking was forced on me because
set_struts
callsXChangeProperty
which obviously wouldn't work without X11 initialization code.Mocking works by linking mocked methods before
conky_core
.I added a basic system to allow retrieving mutations that mocked functions perform (e.g. defining atoms,
XChangeProperty
information, etc.).