-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 unit tests for isValidDeviceId #1827
Comments
As suggested by #1826 (comment)
|
I advise against trying to parse device IDs; these may look parsable but they're opaque strings that aren't meant to be parsed. I'm not familiar with the codebase yet; is there a reason you need to parse these? |
@riverar
It wasn't the best idea to use underscore as a separator. Currently the validation is mainly to avoid importing invalid data from the json file (since it's human readable, it's also human editable so we don't assume it's always valid). We may consider avoiding the validation and keep garbage in the json file, but we may still have to parse it for other purposes. |
This PR #8235 will make this test obsolete, new tests will be required for the updated monitor ID structure. |
@SeraphimaZykova is this still relevant? |
No, this has been done a long ago. |
Test for regression #1821
Valid device ids:
Need to verify why we generate
LOCALDISPLAY_3440_1440_{00000000-0000-0000-0000-000000000000}
even if the code seems to actually add#
afterLOCALDISPLAY
, maybe in this case we already receiveLOCALDISPLAY
by the Windows API.PowerToys/src/modules/fancyzones/lib/FancyZones.cpp
Lines 788 to 790 in a6b7ba4
The text was updated successfully, but these errors were encountered: