mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
[KBM] decoupling editor and engine (#11133)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "CppUnitTest.h"
|
||||
#include "MockedInput.h"
|
||||
#include <keyboardmanager/common/KeyboardManagerState.h>
|
||||
#include <keyboardmanager/KeyboardManagerEngineLibrary/State.h>
|
||||
#include <keyboardmanager/common/KeyboardEventHandlers.h>
|
||||
#include <keyboardmanager/common/Helpers.h>
|
||||
#include "TestHelpers.h"
|
||||
@@ -15,7 +15,7 @@ namespace RemappingLogicTests
|
||||
{
|
||||
private:
|
||||
KeyboardManagerInput::MockedInput mockedInputHandler;
|
||||
KeyboardManagerState testState;
|
||||
State testState;
|
||||
|
||||
public:
|
||||
TEST_METHOD_INITIALIZE(InitializeTestEnv)
|
||||
@@ -36,7 +36,7 @@ namespace RemappingLogicTests
|
||||
for (int i = 0; i < nInputs; i++)
|
||||
{
|
||||
// Set key events for all the extended keys
|
||||
KeyboardManagerHelper::SetKeyEvent(input, i, INPUT_KEYBOARD, keyCodes[i], 0, 0);
|
||||
Helpers::SetKeyEvent(input, i, INPUT_KEYBOARD, keyCodes[i], 0, 0);
|
||||
// Extended key flag should be set
|
||||
Assert::AreEqual(true, bool(input[i].ki.dwFlags & KEYEVENTF_EXTENDEDKEY));
|
||||
}
|
||||
@@ -49,7 +49,7 @@ namespace RemappingLogicTests
|
||||
INPUT input[nInputs] = {};
|
||||
|
||||
int index = 0;
|
||||
KeyboardManagerHelper::SetDummyKeyEvent(input, index, 0);
|
||||
Helpers::SetDummyKeyEvent(input, index, 0);
|
||||
|
||||
// Assert that wScan for both inputs is 0
|
||||
Assert::AreEqual<unsigned int>(0, input[0].ki.wScan);
|
||||
|
||||
Reference in New Issue
Block a user