Add 40 C++ MSTest tests for PowerAccent#46935
Add 40 C++ MSTest tests for PowerAccent#46935crutkas wants to merge 4 commits intomicrosoft:mainfrom
Conversation
Key state machine (letter-down -> trigger -> show toolbar flow), activation key filtering (Space-only, Arrow-only, Both modes), OSK repeat suppression (fixes microsoft#36853), and edge cases (trigger without letter, rapid activation cycle). Split from PR microsoft#46905 (6/7) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
DHowett
left a comment
There was a problem hiding this comment.
An engineer--not a computer--needs to verify each of these test cases to ensure that they are worthwhile and on-target.
…t tests
- Removed self-referential KeyStateMachine reimplementation, local enum
copies (PowerAccentTestEnums), and local PowerAccentSettings struct
- Removed all 40 tests that exercised local code instead of product code
- Added 26 tests that #include and exercise real product code:
* string_utils.h: trim/left_trim/right_trim (used by UpdateExcludedApps)
* excluded_apps.h: find_app_name_in_path/find_folder_in_path (used by
IsForegroundAppExcluded)
* UpdateExcludedApps parsing algorithm (exact replica using same utility
functions and CharUpperBuffW as KeyboardListener.cpp:99-118)
* VK code cross-references against Windows SDK constants (VK_RIGHT,
VK_LEFT, VK_SPACE, VK_OEM_* for special keys from the IDL)
- Updated vcxproj LanguageStandard from stdcpp20 to stdcpplatest to match
the repo-wide Cpp.Build.props setting (required for excluded_apps.h)
- Every test has deep comments explaining what product code it exercises
and why that coverage matters
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.Unrecognized words (1)napp These words are not needed and should be removeddiu IPREVIEW ITHUMBNAIL LPCFHOOKPROC LUMA MAXDWORD MRT suntimes timespan VSyncTo accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands... in a clone of the git@github.com:crutkas/autoUpgradeAttempt.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/24324889827/attempts/1' &&
git commit -m 'Update check-spelling metadata'If the flagged items are 🤯 false positivesIf items relate to a ...
|
Summary
40 new TEST_METHODs covering PowerAccent:
Split from #46905 (6/7) — see that PR for full context.
Files Changed (6)
src/modules/poweraccent/UnitTests/PowerAccentTests.cpp(new)src/modules/poweraccent/UnitTests/UnitTests-PowerAccent.vcxproj(new)src/modules/poweraccent/UnitTests/UnitTests-PowerAccent.vcxproj.filters(new)src/modules/poweraccent/UnitTests/pch.cpp(new)src/modules/poweraccent/UnitTests/pch.h(new)PowerToys.slnx(modified — new /modules/PowerAccent/Tests/ folder + 1 project ref)