Logo
Explore Help
Register Sign In
Mirrors/PowerToys
1
0
Fork 0
You've already forked PowerToys
mirror of https://github.com/microsoft/PowerToys.git synced 2025-12-18 20:49:46 +01:00
Code Issues Packages Projects Releases Wiki Activity
Files
f8cc129f04ad51bb034dd9c7992b6c9976618e12
PowerToys/src/modules/keyboardmanager/test/TestHelpers.cpp

15 lines
362 B
C++
Raw Normal View History

KBM - Set up tests for keyboard hook remapping logic (#4004) * Add test proj, refactor proj with filters, and move single remap function to a separate header * Moved all methods to header files * remove more unused commented code * Reverted sln file * Fixed sln file * Added interface wrapping SendInput calls * fixed formatting * Created test mock class * Added keyboard input logic * Fixed compilation errors and added nuget reference to CppWinRT * Added tests for single key remapping * Refactored code for adding shortcut remap tests * Separated test classes * Fixed tests in release mode * Added more tests * Resolved comments
2020-06-11 13:07:46 -07:00
#include "pch.h"
#include "TestHelpers.h"
namespace TestHelpers
{
// Function to reset the environment variables for tests
void ResetTestEnv(MockedInput& input, KeyboardManagerState& state)
{
input.ResetKeyboardState();
input.SetHookProc(nullptr);
state.ClearSingleKeyRemaps();
state.ClearOSLevelShortcuts();
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 258ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API