diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/ShortcutControl.cpp b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/ShortcutControl.cpp index 6afa4ce349..563a61a5d3 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/ShortcutControl.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/ShortcutControl.cpp @@ -496,11 +496,11 @@ ShortcutControl& ShortcutControl::AddNewShortcutControlRow(StackPanel& parent, s { // not sure why by we need to add the current item in here, so we have it even if does not change. auto newShortcut = std::get(newKeys); - shortcutRemapBuffer.push_back(std::make_pair(RemapBufferItem{ Shortcut(), newShortcut }, std::wstring(targetAppName))); + shortcutRemapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ Shortcut(), newShortcut }, std::wstring(targetAppName) }); } else { - shortcutRemapBuffer.push_back(std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring(targetAppName))); + shortcutRemapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring(targetAppName) }); } KeyDropDownControl::AddShortcutToControl(originalKeys, parent, keyboardRemapControlObjects[keyboardRemapControlObjects.size() - 1][0]->shortcutDropDownVariableSizedWrapGrid.as(), *keyboardManagerState, 0, keyboardRemapControlObjects[keyboardRemapControlObjects.size() - 1][0]->keyDropDownControlObjects, shortcutRemapBuffer, row, targetAppTextBox, false, false); @@ -526,7 +526,7 @@ ShortcutControl& ShortcutControl::AddNewShortcutControlRow(StackPanel& parent, s else { // Initialize both shortcuts as empty shortcuts - shortcutRemapBuffer.push_back(std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring(targetAppName))); + shortcutRemapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring(targetAppName) }); KeyDropDownControl::AddShortcutToControl(originalKeys, parent, keyboardRemapControlObjects[keyboardRemapControlObjects.size() - 1][0]->shortcutDropDownVariableSizedWrapGrid.as(), *keyboardManagerState, 0, keyboardRemapControlObjects[keyboardRemapControlObjects.size() - 1][0]->keyDropDownControlObjects, shortcutRemapBuffer, row, targetAppTextBox, false, false); @@ -666,7 +666,7 @@ StackPanel SetupRunProgramControls(StackPanel& parent, StackPanel& row, Shortcut runProgramAlreadyRunningAction.Items().Append(winrt::box_value(GET_RESOURCE_STRING(IDS_ALREADY_RUNNING_DO_NOTHING))); runProgramAlreadyRunningAction.Items().Append(winrt::box_value(GET_RESOURCE_STRING(IDS_ALREADY_RUNNING_CLOSE))); runProgramAlreadyRunningAction.Items().Append(winrt::box_value(GET_RESOURCE_STRING(IDS_ALREADY_RUNNING_TERMINATE))); - + runProgramAlreadyRunningAction.SelectedIndex(0); controlStackPanel.Children().Append(UIHelpers::GetLabelWrapped(runProgramElevationTypeCombo, GET_RESOURCE_STRING(IDS_EDITSHORTCUTS_LABEL_ELEVATION), runProgramLabelWidth).as()); @@ -1033,7 +1033,7 @@ void ShortcutControl::CreateDetectShortcutWindow(winrt::Windows::Foundation::IIn auto onReleaseSpace = [&keyboardManagerState, allowChordSwitch] { - + keyboardManagerState.AllowChord = !keyboardManagerState.AllowChord; allowChordSwitch.IsOn(keyboardManagerState.AllowChord); }; diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/SingleKeyRemapControl.cpp b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/SingleKeyRemapControl.cpp index c1c92d0d69..8d7240c0b6 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/SingleKeyRemapControl.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/SingleKeyRemapControl.cpp @@ -177,7 +177,7 @@ void SingleKeyRemapControl::AddNewControlKeyRemapRow(StackPanel& parent, std::ve // Set the key text if the two keys are not null (i.e. default args) if (originalKey != NULL && !(newKey.index() == 0 && std::get(newKey) == NULL) && !(newKey.index() == 1 && !EditorHelpers::IsValidShortcut(std::get(newKey))) && !(newKey.index() == 2 && std::get(newKey).empty())) { - singleKeyRemapBuffer.push_back(std::make_pair(RemapBufferItem{ originalKey, newKey }, L"")); + singleKeyRemapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ originalKey, newKey }, L"" }); keyboardRemapControlObjects[keyboardRemapControlObjects.size() - 1][0]->keyDropDownControlObjects[0]->SetSelectedValue(std::to_wstring(originalKey)); if (newKey.index() == 0) { @@ -201,7 +201,7 @@ void SingleKeyRemapControl::AddNewControlKeyRemapRow(StackPanel& parent, std::ve else { // Initialize both keys to NULL - singleKeyRemapBuffer.push_back(std::make_pair(RemapBufferItem{ (DWORD)0, (DWORD)0 }, L"")); + singleKeyRemapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, (DWORD)0 }, L"" }); } // Delete row button diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorTest/BufferValidationTests.cpp b/src/modules/keyboardmanager/KeyboardManagerEditorTest/BufferValidationTests.cpp index 216837b2bb..03aff657a3 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorTest/BufferValidationTests.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEditorTest/BufferValidationTests.cpp @@ -60,8 +60,8 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Add 2 empty rows - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0, (DWORD)0 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0, (DWORD)0 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, (DWORD)0 }, std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, (DWORD)0 }, std::wstring() }); // Validate and update the element when -1 i.e. null selection is made on an empty row. ValidateAndUpdateKeyBufferElementArgs args = { 0, 0, -1 }; @@ -81,7 +81,7 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Add an empty row - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0, (DWORD)0 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, (DWORD)0 }, std::wstring() }); // Validate and update the element when selecting B on an empty row ValidateAndUpdateKeyBufferElementArgs args = { 0, 0, 0x42 }; @@ -99,7 +99,7 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Add a row with A as the target - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0, (DWORD)0x41 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, (DWORD)0x41 }, std::wstring() }); // Validate and update the element when selecting B on a row ValidateAndUpdateKeyBufferElementArgs args = { 0, 0, 0x42 }; @@ -117,7 +117,7 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Add a row with Ctrl+A as the target - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0, Shortcut(std::vector{ VK_CONTROL, 0x41 }) }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, Shortcut(std::vector{ VK_CONTROL, 0x41 }) }, std::wstring() }); // Validate and update the element when selecting B on a row ValidateAndUpdateKeyBufferElementArgs args = { 0, 0, 0x42 }; @@ -135,7 +135,7 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Add a row with A as the target - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0, (DWORD)0x41 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, (DWORD)0x41 }, std::wstring() }); // Validate and update the element when selecting A on a row ValidateAndUpdateKeyBufferElementArgs args = { 0, 0, 0x41 }; @@ -153,8 +153,8 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Add a row from A->B and a row with C as target - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0, (DWORD)0x43 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0x41, (DWORD)0x42 }, std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, (DWORD)0x43 }, std::wstring() }); // Validate and update the element when selecting A on second row ValidateAndUpdateKeyBufferElementArgs args = { 1, 0, 0x41 }; @@ -172,8 +172,8 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Add a row from A->B and a row with Ctrl+A as target - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0, Shortcut(std::vector{ VK_CONTROL, 0x41 }) }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0x41, (DWORD)0x42 }, std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, Shortcut(std::vector{ VK_CONTROL, 0x41 }) }, std::wstring() }); // Validate and update the element when selecting A on second row ValidateAndUpdateKeyBufferElementArgs args = { 1, 0, 0x41 }; @@ -191,8 +191,8 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Add a row from Ctrl->B and a row with C as target - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)VK_CONTROL, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0, (DWORD)0x43 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)VK_CONTROL, (DWORD)0x42 }, std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, (DWORD)0x43 }, std::wstring() }); // Validate and update the element when selecting LCtrl on second row ValidateAndUpdateKeyBufferElementArgs args = { 1, 0, VK_LCONTROL }; @@ -210,8 +210,8 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Add a row from Ctrl->B and a row with Ctrl+A as target - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)VK_CONTROL, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0, Shortcut(std::vector{ VK_CONTROL, 0x41 }) }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)VK_CONTROL, (DWORD)0x42 }, std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ (DWORD)0, Shortcut(std::vector{ VK_CONTROL, 0x41 }) }, std::wstring() }); // Validate and update the element when selecting LCtrl on second row ValidateAndUpdateKeyBufferElementArgs args = { 1, 0, VK_LCONTROL }; @@ -228,55 +228,55 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when making null-selection (-1 index) on first column of empty shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 2: Validate the element when making null-selection (-1 index) on second column of empty shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 3: Validate the element when making null-selection (-1 index) on first column of empty shortcut to key row - testCases.push_back({ 0, 0, 0, std::vector{ -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), (DWORD)0 }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), (DWORD)0 }, std::wstring() } }); // Case 4: Validate the element when making null-selection (-1 index) on second column of empty shortcut to key row - testCases.push_back({ 0, 1, 0, std::vector{ -1 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), (DWORD)0 }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ -1 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), (DWORD)0 }, std::wstring() } }); // Case 5: Validate the element when making null-selection (-1 index) on first dropdown of first column of valid shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector({ -1, 0x43 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector({ -1, 0x43 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 6: Validate the element when making null-selection (-1 index) on first dropdown of second column of valid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector({ -1, 0x41 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector({ -1, 0x41 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 7: Validate the element when making null-selection (-1 index) on first dropdown of second column of valid hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector({ -1, 0x41 }), std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector({ -1, 0x41 }), std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 8: Validate the element when making null-selection (-1 index) on second dropdown of first column of valid shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector({ VK_CONTROL, -1 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector({ VK_CONTROL, -1 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 9: Validate the element when making null-selection (-1 index) on second dropdown of second column of valid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector({ VK_CONTROL, -1 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector({ VK_CONTROL, -1 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 10: Validate the element when making null-selection (-1 index) on second dropdown of second column of valid hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector({ VK_CONTROL, -1 }), std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector({ VK_CONTROL, -1 }), std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 11: Validate the element when making null-selection (-1 index) on first dropdown of first column of valid 3 key shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector({ -1, VK_SHIFT, 0x44 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector({ -1, VK_SHIFT, 0x44 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 12: Validate the element when making null-selection (-1 index) on first dropdown of second column of valid 3 key shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector({ -1, VK_SHIFT, 0x42 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector({ -1, VK_SHIFT, 0x42 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 13: Validate the element when making null-selection (-1 index) on first dropdown of second column of valid hybrid 3 key shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector({ -1, VK_SHIFT, 0x42 }), std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector({ -1, VK_SHIFT, 0x42 }), std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 14: Validate the element when making null-selection (-1 index) on second dropdown of first column of valid 3 key shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector({ VK_CONTROL, -1, 0x44 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector({ VK_CONTROL, -1, 0x44 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 15: Validate the element when making null-selection (-1 index) on second dropdown of second column of valid 3 key shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector({ VK_CONTROL, -1, 0x42 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector({ VK_CONTROL, -1, 0x42 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 16: Validate the element when making null-selection (-1 index) on second dropdown of second column of valid hybrid 3 key shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector({ VK_CONTROL, -1, 0x42 }), std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector({ VK_CONTROL, -1, 0x42 }), std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 17: Validate the element when making null-selection (-1 index) on third dropdown of first column of valid 3 key shortcut to shortcut row - testCases.push_back({ 0, 0, 2, std::vector({ VK_CONTROL, VK_SHIFT, -1 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 2, std::vector({ VK_CONTROL, VK_SHIFT, -1 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 18: Validate the element when making null-selection (-1 index) on third dropdown of second column of valid 3 key shortcut to shortcut row - testCases.push_back({ 0, 1, 2, std::vector({ VK_CONTROL, VK_SHIFT, -1 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector({ VK_CONTROL, VK_SHIFT, -1 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 19: Validate the element when making null-selection (-1 index) on third dropdown of second column of valid hybrid 3 key shortcut to shortcut row - testCases.push_back({ 0, 1, 2, std::vector({ VK_CONTROL, VK_SHIFT, -1 }), std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector({ VK_CONTROL, VK_SHIFT, -1 }), std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 20: Validate the element when making null-selection (-1 index) on fourth dropdown of first column of valid 4 key shortcut to shortcut row - testCases.push_back({ 0, 0, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, -1 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, -1 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x42 } }, std::wstring() } }); // Case 21: Validate the element when making null-selection (-1 index) on fourth dropdown of second column of valid 4 key shortcut to shortcut row - testCases.push_back({ 0, 1, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, -1 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, -1 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x42 } }, std::wstring() } }); // Case 22: Validate the element when making null-selection (-1 index) on fourth dropdown of second column of valid hybrid 4 key shortcut to shortcut row - testCases.push_back({ 0, 1, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, -1 }), std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, -1 }), std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, 0x42 } }, std::wstring() } }); // Case 23: Validate the element when making null-selection (-1 index) on fifth dropdown of first column of valid 5 key shortcut to shortcut row - testCases.push_back({ 0, 0, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, -1 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, -1 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x42 } }, std::wstring() } }); // Case 24: Validate the element when making null-selection (-1 index) on fifth dropdown of second column of valid 5 key shortcut to shortcut row - testCases.push_back({ 0, 1, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, -1 }), std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, -1 }), std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x42 } }, std::wstring() } }); // Case 25: Validate the element when making null-selection (-1 index) on fifth dropdown of second column of valid hybrid 5 key shortcut to shortcut row - testCases.push_back({ 0, 1, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, -1 }), std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 3, std::vector({ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, -1 }), std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x44 }, std::vector{ VK_CONTROL, VK_SHIFT, VK_MENU, VK_LWIN, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -297,13 +297,13 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting A (0x41) on first dropdown of first column of empty shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ 0x41 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ 0x41 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting A (0x41) on first dropdown of second column of empty shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0x41 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0x41 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 3: Validate the element when selecting A (0x41) on first dropdown of first column of empty shortcut to key row - testCases.push_back({ 0, 0, 0, std::vector{ 0x41 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), (DWORD)0 }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ 0x41 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), (DWORD)0 }, std::wstring() } }); // Case 4: Validate the element when selecting A (0x41) on first dropdown of first column of valid shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ 0x41, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ 0x41, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -324,9 +324,9 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting A (0x41) on first dropdown of second column of empty shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0x41 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0x41 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting A (0x41) on first dropdown of second column of empty shortcut to key row - testCases.push_back({ 0, 1, 0, std::vector{ 0x41 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), (DWORD)0 }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0x41 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), (DWORD)0 }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -349,9 +349,9 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting A (0x41) on first dropdown of second column of hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0x41, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0x41, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 2: Validate the element when selecting A (0x41) on second dropdown of second column of hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41, 0x42 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41, 0x42 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -374,9 +374,9 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting A (0x41) on second dropdown of first column of shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x41, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x41, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 2: Validate the element when selecting A (0x41)on second dropdown of second column of shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41, 0x42 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41, 0x42 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -397,17 +397,17 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting A (0x41) on last dropdown of first column of three key shortcut to shortcut row - testCases.push_back({ 0, 0, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x41 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x41 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 2: Validate the element when selecting A (0x41) on last dropdown of second column of three key shortcut to shortcut row - testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x41 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x41 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 3: Validate the element when selecting A (0x41) on last dropdown of hybrid second column of three key shortcut to shortcut row - testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x41 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x41 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 4: Validate the element when selecting A (0x41) on last dropdown of first column of two key shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x41 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x41 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 5: Validate the element when selecting A (0x41) on last dropdown of second column of two key shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 6: Validate the element when selecting A (0x41) on last dropdown of hybrid second column of two key shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -428,17 +428,17 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting A (0x41) on second dropdown of first column of 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x41, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x41, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 2: Validate the element when selecting A (0x41) on second dropdown of second column of 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 3: Validate the element when selecting A (0x41) on second dropdown of second column of 3 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41, -1 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x41, -1 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 4: Validate the element when selecting A (0x41) on second dropdown of first column of empty 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ -1, 0x41, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ -1, 0x41, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 5: Validate the element when selecting A (0x41) on second dropdown of second column of empty 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ -1, 0x41, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ -1, 0x41, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 6: Validate the element when selecting A (0x41) on second dropdown of second column of empty 3 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ -1, 0x41, -1 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ -1, 0x41, -1 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -459,7 +459,7 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting A (0x41) on first dropdown of second column of empty 3 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0x41, -1, -1 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0x41, -1, -1 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -480,19 +480,19 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting Shift (VK_SHIFT) on second dropdown of first column of 2 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 2: Validate the element when selecting Shift (VK_SHIFT) on second dropdown of second column of 2 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 3: Validate the element when selecting Shift (VK_SHIFT) on second dropdown of second column of 2 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 4: Validate the element when selecting Shift (VK_SHIFT) on first dropdown of first column of 1 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 5: Validate the element when selecting Shift (VK_SHIFT) on first dropdown of second column of 1 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 6: Validate the element when selecting Shift (VK_SHIFT) on first dropdown of second column of 1 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 7: Validate the element when selecting Shift (VK_SHIFT) on first dropdown of second column of 1 dropdown hybrid shortcut to key row with an action key selected - testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), (DWORD)0x44 }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), (DWORD)0x44 }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -513,11 +513,11 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting LCtrl (VK_LCONTROL) on second dropdown of first column of 2 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_LCONTROL }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_LCONTROL }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 2: Validate the element when selecting LCtrl (VK_LCONTROL) on second dropdown of second column of 2 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_LCONTROL }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_LCONTROL }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 3: Validate the element when selecting LCtrl (VK_LCONTROL) on second dropdown of second column of 2 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_LCONTROL }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_LCONTROL }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -538,23 +538,23 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting Shift (VK_SHIFT) on last dropdown of first column of 5 dropdown shortcut to shortcut row with middle empty - testCases.push_back({ 0, 0, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 2: Validate the element when selecting Shift (VK_SHIFT) on last dropdown of second column of 5 dropdown shortcut to shortcut row with middle empty - testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 3: Validate the element when selecting Shift (VK_SHIFT) on last dropdown of second column of 5 dropdown hybrid shortcut to shortcut row with middle empty - testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_SHIFT }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_SHIFT }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 4: Validate the element when selecting Shift (VK_SHIFT) on last dropdown of first column of 5 dropdown shortcut to shortcut row with first four empty - testCases.push_back({ 0, 0, 4, std::vector{ -1, -1, -1, -1, VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 4, std::vector{ -1, -1, -1, -1, VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 5: Validate the element when selecting Shift (VK_SHIFT) on last dropdown of second column of 5 dropdown shortcut to shortcut row with first four empty - testCases.push_back({ 0, 1, 4, std::vector{ -1, -1, -1, -1, VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 4, std::vector{ -1, -1, -1, -1, VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 6: Validate the element when selecting Shift (VK_SHIFT) on last dropdown of second column of 5 dropdown hybrid shortcut to shortcut row with first four empty - testCases.push_back({ 0, 1, 4, std::vector{ -1, -1, -1, -1, VK_SHIFT }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 4, std::vector{ -1, -1, -1, -1, VK_SHIFT }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 7: Validate the element when selecting Shift (VK_SHIFT) on last dropdown of first column of 5 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x42 } }, std::wstring() } }); // Case 8: Validate the element when selecting Shift (VK_SHIFT) on last dropdown of second column of 5 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x42 } }, std::wstring() } }); // Case 9: Validate the element when selecting Shift (VK_SHIFT) on last dropdown of second column of 5 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, VK_SHIFT }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, VK_SHIFT }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_RWIN, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -575,17 +575,17 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting Ctrl (VK_CONTROL) on last dropdown of first column of 5 dropdown shortcut to shortcut row with middle empty - testCases.push_back({ 0, 0, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_CONTROL }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_CONTROL }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 2: Validate the element when selecting Ctrl (VK_CONTROL) on last dropdown of second column of 5 dropdown shortcut to shortcut row with middle empty - testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_CONTROL }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_CONTROL }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 3: Validate the element when selecting Ctrl (VK_CONTROL) on last dropdown of second column of 5 dropdown hybrid shortcut to shortcut row with middle empty - testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_CONTROL }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, -1, -1, -1, VK_CONTROL }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 4: Validate the element when selecting Ctrl (VK_CONTROL) on last dropdown of first column of 5 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, VK_CONTROL }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, VK_CONTROL }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 5: Validate the element when selecting Ctrl (VK_CONTROL) on last dropdown of second column of 5 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, VK_CONTROL }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, VK_CONTROL }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x42 } }, std::wstring() } }); // Case 6: Validate the element when selecting Ctrl (VK_CONTROL) on last dropdown of second column of 5 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, VK_CONTROL }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 4, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, VK_CONTROL }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, VK_LWIN, VK_SHIFT, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -606,23 +606,23 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting Shift (VK_SHIFT) on first dropdown of first column of 2 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 2: Validate the element when selecting Shift (VK_SHIFT) on first dropdown of second column of 2 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 3: Validate the element when selecting Shift (VK_SHIFT) on first dropdown of second column of 2 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, VK_SHIFT }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 4: Validate the element when selecting Shift (VK_SHIFT) on first dropdown of first column of 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ VK_SHIFT, VK_MENU, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ VK_SHIFT, VK_MENU, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 5: Validate the element when selecting Shift (VK_SHIFT) on first dropdown of second column of 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT, VK_MENU, 0x42 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT, VK_MENU, 0x42 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 6: Validate the element when selecting Shift (VK_SHIFT) on first dropdown of second column of 3 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT, VK_MENU, 0x42 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT, VK_MENU, 0x42 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 7: Validate the element when selecting Shift (VK_SHIFT) on second dropdown of first column of 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 8: Validate the element when selecting Shift (VK_SHIFT) on second dropdown of second column of 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 9: Validate the element when selecting Shift (VK_SHIFT) on second dropdown of second column of 3 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x42 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -643,23 +643,23 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of first column of 3 dropdown shortcut to shortcut row with first empty - testCases.push_back({ 0, 0, 0, std::vector{ VK_CONTROL, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ VK_CONTROL, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 2: Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of second column of 3 dropdown shortcut to shortcut row with first empty - testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, VK_CONTROL, 0x42 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, VK_CONTROL, 0x42 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 3: Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of second column of 3 dropdown hybrid shortcut to shortcut row with first empty - testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, VK_CONTROL, 0x42 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, VK_CONTROL, 0x42 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 4: Validate the element when selecting Alt (VK_MENU) on first dropdown of first column of 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ VK_MENU, VK_MENU, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ VK_MENU, VK_MENU, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 5: Validate the element when selecting Alt (VK_MENU) on first dropdown of second column of 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ VK_MENU, VK_MENU, 0x42 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_MENU, VK_MENU, 0x42 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 6: Validate the element when selecting Alt (VK_MENU) on first dropdown of second column of 3 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ VK_MENU, VK_MENU, 0x42 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_MENU, VK_MENU, 0x42 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 7: Validate the element when selecting Ctrl (VK_CONTROL) on second dropdown of first column of 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 8: Validate the element when selecting Ctrl (VK_CONTROL) on second dropdown of second column of 3 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_CONTROL, 0x42 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_CONTROL, 0x42 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 9: Validate the element when selecting Ctrl (VK_CONTROL) on second dropdown of second column of 3 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_CONTROL, 0x42 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_CONTROL, 0x42 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -680,9 +680,9 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting None (0) on first dropdown of first column of 1 dropdown shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ 0 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ 0 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting None (0) on first dropdown of second column of 1 dropdown shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -703,7 +703,7 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting None (0) on first dropdown of first column of 1 dropdown hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -724,13 +724,13 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting None (0) on first dropdown of first column of 2 dropdown empty shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ 0, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ 0, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting None (0) on first dropdown of second column of 2 dropdown empty shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 3: Validate the element when selecting None (0) on first dropdown of second column of 2 dropdown valid shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ 0, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ 0, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 4: Validate the element when selecting None (0) on first dropdown of second column of 2 dropdown valid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0, 0x42 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, 0x42 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -751,13 +751,13 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting None (0) on second dropdown of first column of 2 dropdown empty shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ -1, 0 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ -1, 0 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting None (0) on second dropdown of second column of 2 dropdown empty shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ -1, 0 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ -1, 0 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 3: Validate the element when selecting None (0) on second dropdown of second column of 2 dropdown valid shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 4: Validate the element when selecting None (0) on second dropdown of second column of 2 dropdown valid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -778,13 +778,13 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting None (0) on first dropdown of second column of 2 dropdown empty hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0, -1 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, -1 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting None (0) on second dropdown of second column of 2 dropdown empty hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ -1, 0 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ -1, 0 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 3: Validate the element when selecting None (0) on first dropdown of second column of 2 dropdown valid hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0, VK_CONTROL }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, VK_CONTROL }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); // Case 4: Validate the element when selecting None (0) on second dropdown of second column of 2 dropdown valid hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -805,29 +805,29 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting None (0) on first dropdown of first column of 3 dropdown empty shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ 0, -1, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ 0, -1, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting None (0) on first dropdown of second column of 3 dropdown empty shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0, -1, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, -1, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 3: Validate the element when selecting None (0) on first dropdown of second column of 3 dropdown empty hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0, -1, -1 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, -1, -1 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 4: Validate the element when selecting None (0) on second dropdown of first column of 3 dropdown empty shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ -1, 0, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ -1, 0, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 5: Validate the element when selecting None (0) on second dropdown of second column of 3 dropdown empty shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ -1, 0, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ -1, 0, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 6: Validate the element when selecting None (0) on second dropdown of second column of 3 dropdown empty hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ -1, 0, -1 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ -1, 0, -1 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 7: Validate the element when selecting None (0) on first dropdown of first column of 3 dropdown valid shortcut to shortcut row - testCases.push_back({ 0, 0, 0, std::vector{ 0, VK_MENU, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ 0, VK_MENU, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 8: Validate the element when selecting None (0) on first dropdown of second column of 3 dropdown valid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0, VK_MENU, 0x42 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, VK_MENU, 0x42 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 9: Validate the element when selecting None (0) on first dropdown of second column of 3 dropdown valid hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 0, std::vector{ 0, VK_MENU, 0x42 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, VK_MENU, 0x42 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 10: Validate the element when selecting None (0) on first dropdown of first column of 3 dropdown valid shortcut to shortcut row - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 11: Validate the element when selecting None (0) on first dropdown of second column of 3 dropdown valid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0, 0x42 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0, 0x42 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 12: Validate the element when selecting None (0) on first dropdown of second column of 3 dropdown valid hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0, 0x42 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0, 0x42 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -848,17 +848,17 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting None (0) on first dropdown of first column of 3 dropdown empty shortcut to shortcut row - testCases.push_back({ 0, 0, 2, std::vector{ -1, -1, 0 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 2, std::vector{ -1, -1, 0 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting None (0) on first dropdown of second column of 3 dropdown empty shortcut to shortcut row - testCases.push_back({ 0, 1, 2, std::vector{ -1, -1, 0 }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ -1, -1, 0 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 3: Validate the element when selecting None (0) on first dropdown of second column of 3 dropdown empty hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 2, std::vector{ -1, -1, 0 }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ -1, -1, 0 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), Shortcut() }, std::wstring() } }); // Case 4: Validate the element when selecting None (0) on first dropdown of first column of 3 dropdown valid shortcut to shortcut row - testCases.push_back({ 0, 0, 2, std::vector{ VK_CONTROL, VK_MENU, 0 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 2, std::vector{ VK_CONTROL, VK_MENU, 0 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 5: Validate the element when selecting None (0) on first dropdown of second column of 3 dropdown valid shortcut to shortcut row - testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_MENU, 0 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_MENU, 0 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); // Case 6: Validate the element when selecting None (0) on first dropdown of second column of 3 dropdown valid hybrid shortcut to shortcut row - testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_MENU, 0 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_MENU, 0 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU, 0x43 }, std::vector{ VK_CONTROL, VK_MENU, 0x42 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -879,23 +879,23 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting L (0x4C) on second dropdown of first column of LWin+Empty shortcut - testCases.push_back({ 0, 0, 1, std::vector{ VK_LWIN, 0x4C }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_LWIN }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_LWIN, 0x4C }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LWIN }, Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting L (0x4C) on second dropdown of second column of LWin+Empty shortcut - testCases.push_back({ 0, 1, 1, std::vector{ VK_LWIN, 0x4C }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_LWIN, 0x4C }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN } }, std::wstring() } }); // Case 3: Validate the element when selecting L (0x4C) on second dropdown of second column of hybrid LWin+Empty shortcut - testCases.push_back({ 0, 1, 1, std::vector{ VK_LWIN, 0x4C }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_LWIN, 0x4C }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN } }, std::wstring() } }); // Case 4: Validate the element when selecting L (0x4C) on second dropdown of first column of Win+Empty shortcut - testCases.push_back({ 0, 0, 1, std::vector{ CommonSharedConstants::VK_WIN_BOTH, 0x4C }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ CommonSharedConstants::VK_WIN_BOTH }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ CommonSharedConstants::VK_WIN_BOTH, 0x4C }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ CommonSharedConstants::VK_WIN_BOTH }, Shortcut() }, std::wstring() } }); // Case 5: Validate the element when selecting L (0x4C) on second dropdown of second column of Win+Empty shortcut - testCases.push_back({ 0, 1, 1, std::vector{ CommonSharedConstants::VK_WIN_BOTH, 0x4C }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ CommonSharedConstants::VK_WIN_BOTH } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ CommonSharedConstants::VK_WIN_BOTH, 0x4C }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ CommonSharedConstants::VK_WIN_BOTH } }, std::wstring() } }); // Case 6: Validate the element when selecting L (0x4C) on second dropdown of second column of hybrid Win+Empty shortcut - testCases.push_back({ 0, 1, 1, std::vector{ CommonSharedConstants::VK_WIN_BOTH, 0x4C }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ CommonSharedConstants::VK_WIN_BOTH } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ CommonSharedConstants::VK_WIN_BOTH, 0x4C }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ CommonSharedConstants::VK_WIN_BOTH } }, std::wstring() } }); // Case 7: Validate the element when selecting LWin (VK_LWIN) on first dropdown of first column of Empty+L shortcut - testCases.push_back({ 0, 0, 0, std::vector{ VK_LWIN, 0x4C }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ 0x4C }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ VK_LWIN, 0x4C }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x4C }, Shortcut() }, std::wstring() } }); // Case 8: Validate the element when selecting LWin (VK_LWIN) on first dropdown of second column of Empty+L shortcut - testCases.push_back({ 0, 1, 0, std::vector{ VK_LWIN, 0x4C }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ 0x4C } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_LWIN, 0x4C }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ 0x4C } }, std::wstring() } }); // Case 9: Validate the element when selecting LWin (VK_LWIN) on first dropdown of second column of hybrid Empty+L shortcut - testCases.push_back({ 0, 1, 0, std::vector{ VK_LWIN, 0x4C }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ 0x4C } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_LWIN, 0x4C }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ 0x4C } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -915,17 +915,17 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting Null (-1) on second dropdown of first column of LWin + Ctrl + L shortcut - testCases.push_back({ 0, 0, 2, std::vector{ VK_LWIN, -1, 0x4C }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_LWIN, VK_CONTROL, 0x4C }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 2, std::vector{ VK_LWIN, -1, 0x4C }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LWIN, VK_CONTROL, 0x4C }, Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting Null (-1) on second dropdown of second column of LWin + Ctrl + L shortcut - testCases.push_back({ 0, 1, 2, std::vector{ VK_LWIN, -1, 0x4C }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN, VK_CONTROL, 0x4C } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_LWIN, -1, 0x4C }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN, VK_CONTROL, 0x4C } }, std::wstring() } }); // Case 3: Validate the element when selecting Null (-1) on second dropdown of second column of hybrid LWin + Ctrl + L shortcut - testCases.push_back({ 0, 1, 2, std::vector{ VK_LWIN, -1, 0x4C }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN, VK_CONTROL, 0x4C } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_LWIN, -1, 0x4C }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN, VK_CONTROL, 0x4C } }, std::wstring() } }); // Case 4: Validate the element when selecting None (0) on second dropdown of first column of LWin + Ctrl + L shortcut - testCases.push_back({ 0, 0, 2, std::vector{ VK_LWIN, 0, 0x4C }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_LWIN, VK_CONTROL, 0x4C }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 2, std::vector{ VK_LWIN, 0, 0x4C }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LWIN, VK_CONTROL, 0x4C }, Shortcut() }, std::wstring() } }); // Case 5: Validate the element when selecting None (0) on second dropdown of second column of LWin + Ctrl + L shortcut - testCases.push_back({ 0, 1, 2, std::vector{ VK_LWIN, 0, 0x4C }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN, VK_CONTROL, 0x4C } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_LWIN, 0, 0x4C }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN, VK_CONTROL, 0x4C } }, std::wstring() } }); // Case 6: Validate the element when selecting None (0) on second dropdown of second column of hybrid LWin + Ctrl + L shortcut - testCases.push_back({ 0, 1, 2, std::vector{ VK_LWIN, 0, 0x4C }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN, VK_CONTROL, 0x4C } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_LWIN, 0, 0x4C }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_LWIN, VK_CONTROL, 0x4C } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -945,17 +945,17 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting Del (VK_DELETE) on third dropdown of first column of Ctrl+Alt+Empty shortcut - testCases.push_back({ 0, 0, 2, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 2, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_MENU }, Shortcut() }, std::wstring() } }); // Case 2: Validate the element when selecting Del (VK_DELETE) on third dropdown of second column of Ctrl+Alt+Empty shortcut - testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, VK_MENU } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, VK_MENU } }, std::wstring() } }); // Case 3: Validate the element when selecting Del (VK_DELETE) on third dropdown of second column of hybrid Ctrl+Alt+Empty shortcut - testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, VK_MENU } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, VK_MENU } }, std::wstring() } }); // Case 4: Validate the element when selecting Alt (VK_MENU) on second dropdown of first column of Ctrl+Empty+Del shortcut - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_DELETE }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_DELETE }, Shortcut() }, std::wstring() } }); // Case 5: Validate the element when selecting Alt (VK_MENU) on second dropdown of second column of Ctrl+Empty+Del shortcut - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), false, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, VK_DELETE } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, VK_DELETE } }, std::wstring() } }); // Case 6: Validate the element when selecting Alt (VK_MENU) on second dropdown of second column of hybrid Ctrl+Empty+Del shortcut - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), true, std::make_pair(RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, VK_DELETE } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_MENU, VK_DELETE }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ Shortcut(), std::vector{ VK_CONTROL, VK_DELETE } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -975,21 +975,21 @@ namespace RemappingUITests { std::vector testCases; // Case 1: Validate the element when selecting A (0x41) on first dropdown of empty hybrid second column - testCases.push_back({ 0, 1, 0, std::vector{ 0x41, -1, -1 }, std::wstring(), true, std::make_pair(RemapBufferItem{ (DWORD)0x41, (DWORD)0 }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0x41, -1, -1 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ (DWORD)0x41, (DWORD)0 }, std::wstring() } }); // Case 2: Validate the element when selecting A (0x41) on second dropdown of empty hybrid second column - testCases.push_back({ 0, 1, 1, std::vector{ -1, 0x41, -1 }, std::wstring(), true, std::make_pair(RemapBufferItem{ (DWORD)0x41, (DWORD)0 }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ -1, 0x41, -1 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ (DWORD)0x41, (DWORD)0 }, std::wstring() } }); // Case 3: Validate the element when selecting A (0x41) on third dropdown of empty hybrid second column - testCases.push_back({ 0, 1, 2, std::vector{ -1, -1, 0x41 }, std::wstring(), true, std::make_pair(RemapBufferItem{ (DWORD)0x41, (DWORD)0 }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ -1, -1, 0x41 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ (DWORD)0x41, (DWORD)0 }, std::wstring() } }); // Case 4: Validate the element when selecting A (0x41) on first dropdown of hybrid second column with key - testCases.push_back({ 0, 1, 0, std::vector{ 0x41 }, std::wstring(), true, std::make_pair(RemapBufferItem{ (DWORD)0x41, (DWORD)0x43 }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0x41 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ (DWORD)0x41, (DWORD)0x43 }, std::wstring() } }); // Case 5: Validate the element when selecting Null (-1) on first dropdown of hybrid second column with shortcut - testCases.push_back({ 0, 1, 0, std::vector{ -1, 0x41 }, std::wstring(), true, std::make_pair(RemapBufferItem{ (DWORD)0x41, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ -1, 0x41 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ (DWORD)0x41, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 6: Validate the element when selecting None (0) on first dropdown of hybrid second column with shortcut - testCases.push_back({ 0, 1, 0, std::vector{ 0, 0x41 }, std::wstring(), true, std::make_pair(RemapBufferItem{ (DWORD)0x41, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, 0x41 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ (DWORD)0x41, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 7: Validate the element when selecting Null (-1) on second dropdown of hybrid second column with shortcut - testCases.push_back({ 0, 1, 1, std::vector{ -1, VK_CONTROL }, std::wstring(), true, std::make_pair(RemapBufferItem{ (DWORD)VK_CONTROL, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ -1, VK_CONTROL }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ (DWORD)VK_CONTROL, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 8: Validate the element when selecting None (0) on second dropdown of hybrid second column with shortcut - testCases.push_back({ 0, 1, 1, std::vector{ 0, VK_CONTROL }, std::wstring(), true, std::make_pair(RemapBufferItem{ (DWORD)VK_CONTROL, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ 0, VK_CONTROL }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ (DWORD)VK_CONTROL, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -1009,23 +1009,23 @@ namespace RemappingUITests { std::vector testCases; // Case 1 : Validate the element when selecting C (0x43) on third dropdown of first column with Ctrl+Shift+Empty - testCases.push_back({ 0, 0, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring() } }); // Case 2 : Validate the element when selecting C (0x43) on third dropdown of second column with Ctrl+Shift+Empty - testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT } }, std::wstring() } }); // Case 3 : Validate the element when selecting C (0x43) on third dropdown of second column with hybrid Ctrl+Shift+Empty - testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT } }, std::wstring() } }); // Case 4 : Validate the element when selecting Shift (VK_SHIFT) on second dropdown of first column with Ctrl+Empty+C - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring() } }); // Case 5 : Validate the element when selecting Shift (VK_SHIFT) on second dropdown of second column with Ctrl+Empty+C - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 6 : Validate the element when selecting Shift (VK_SHIFT) on second dropdown of second column with hybrid Ctrl+Empty+C - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 7 : Validate the element when selecting Shift (VK_SHIFT) on first dropdown of first column with Empty+Ctrl+C - testCases.push_back({ 0, 0, 0, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring() } }); // Case 8 : Validate the element when selecting Shift (VK_SHIFT) on first dropdown of second column with Empty+Ctrl+C - testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 9 : Validate the element when selecting Shift (VK_SHIFT) on first dropdown of second column with hybrid Empty+Ctrl+C - testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -1045,65 +1045,65 @@ namespace RemappingUITests { std::vector testCases; // Case 1 : Validate the element when selecting C (0x43) on third dropdown of first column with Ctrl+Empty+Empty - testCases.push_back({ 0, 0, 2, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 2, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 2 : Validate the element when selecting C (0x43) on third dropdown of second column with Ctrl+Empty+Empty - testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL } }, std::wstring() } }); // Case 3 : Validate the element when selecting C (0x43) on third dropdown of second column with hybrid Ctrl+Empty+Empty - testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL } }, std::wstring()) }); + testCases.push_back({ 0, 1, 2, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL } }, std::wstring() } }); // Case 4 : Validate the element when selecting C (0x43) on second dropdown of first column with Ctrl+Empty+Empty - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x43, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x43, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 5 : Validate the element when selecting C (0x43) on second dropdown of second column with Ctrl+Empty+Empty - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL } }, std::wstring() } }); // Case 6 : Validate the element when selecting C (0x43) on second dropdown of second column with hybrid Ctrl+Empty+Empty - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43, -1 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43, -1 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL } }, std::wstring() } }); // Case 7 : Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of first column with Empty+Empty+C - testCases.push_back({ 0, 0, 0, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 8 : Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of second column with Empty+Empty+C - testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ 0x43 } }, std::wstring() } }); // Case 9 : Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of second column with hybrid Empty+Empty+C - testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ 0x43 } }, std::wstring() } }); // Case 10 : Validate the element when selecting Ctrl (VK_CONTROL) on second dropdown of first column with Empty+Empty+C - testCases.push_back({ 0, 0, 1, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 11 : Validate the element when selecting Ctrl (VK_CONTROL) on second dropdown of second column with Empty+Empty+C - testCases.push_back({ 0, 1, 1, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ 0x43 } }, std::wstring() } }); // Case 12 : Validate the element when selecting Ctrl (VK_CONTROL) on second dropdown of second column with hybrid Empty+Empty+C - testCases.push_back({ 0, 1, 1, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ 0x43 } }, std::wstring() } }); // Case 13 : Validate the element when selecting C (0x43) on second dropdown of first column with Ctrl+A - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x41 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x41 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 14 : Validate the element when selecting C (0x43) on second dropdown of second column with Ctrl+A - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 15 : Validate the element when selecting C (0x43) on second dropdown of second column with hybrid Ctrl+A - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x41 } }, std::wstring() } }); // Case 16 : Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of first column with Alt+C - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_MENU, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_MENU, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 17 : Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of second column with Alt+C - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_MENU, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_MENU, 0x43 } }, std::wstring() } }); // Case 18 : Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of second column with hybrid Alt+C - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_MENU, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_MENU, 0x43 } }, std::wstring() } }); // Case 19 : Validate the element when selecting Null (-1) on second dropdown of first column with Ctrl+Shift+C - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 20 : Validate the element when selecting Null (-1) on second dropdown of second column with Ctrl+Shift+C - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring() } }); // Case 21 : Validate the element when selecting Null (-1) on second dropdown of second column with hybrid Ctrl+Shift+C - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring() } }); // Case 22 : Validate the element when selecting None (0) on second dropdown of first column with Ctrl+Shift+C - testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 1, std::vector{ VK_CONTROL, 0, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 23 : Validate the element when selecting None (0) on second dropdown of second column with Ctrl+Shift+C - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring() } }); // Case 24 : Validate the element when selecting None (0) on second dropdown of second column with hybrid Ctrl+Shift+C - testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 1, std::vector{ VK_CONTROL, 0, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 } }, std::wstring() } }); // Case 25 : Validate the element when selecting Null (-1) on first dropdown of first column with Shift+Ctrl+C - testCases.push_back({ 0, 0, 0, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 26 : Validate the element when selecting Null (-1) on first dropdown of second column with Shift+Ctrl+C - testCases.push_back({ 0, 1, 0, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 27 : Validate the element when selecting Null (-1) on first dropdown of second column with hybrid Shift+Ctrl+C - testCases.push_back({ 0, 1, 0, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 28 : Validate the element when selecting None (0) on first dropdown of first column with Shift+Ctrl+C - testCases.push_back({ 0, 0, 0, std::vector{ 0, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 0, 0, std::vector{ 0, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::vector{ VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 29 : Validate the element when selecting None (0) on first dropdown of second column with Shift+Ctrl+C - testCases.push_back({ 0, 1, 0, std::vector{ 0, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 } }, std::wstring() } }); // Case 30 : Validate the element when selecting None (0) on first dropdown of second column with hybrid Shift+Ctrl+C - testCases.push_back({ 0, 1, 0, std::vector{ 0, VK_CONTROL, 0x43 }, std::wstring(), true, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 } }, std::wstring()) }); + testCases.push_back({ 0, 1, 0, std::vector{ 0, VK_CONTROL, 0x43 }, std::wstring(), true, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 } }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange @@ -1123,17 +1123,17 @@ namespace RemappingUITests { std::vector testCases; // Case 1 : Validate the element when selecting C (0x43) on third dropdown of first column with Ctrl+Shift+Empty - testCases.push_back({ 1, 0, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT }, Shortcut() }, std::wstring() } }); // Case 2 : Validate the element when selecting Shift (VK_SHIFT) on second dropdown of first column with Ctrl+Empty+C - testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, std::wstring() } }); // Case 3 : Validate the element when selecting Shift (VK_SHIFT) on first dropdown of first column with Empty+Ctrl+C - testCases.push_back({ 1, 0, 0, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange RemapBuffer remapBuffer; // Ctrl+Shift+C remapped - remapBuffer.push_back(std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring() }); remapBuffer.push_back(testCase.bufferRow); // Act @@ -1149,17 +1149,17 @@ namespace RemappingUITests { std::vector testCases; // Case 1 : Validate the element when selecting C (0x43) on third dropdown of first column with Ctrl+Shift+Empty for testApp2 - testCases.push_back({ 1, 0, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 2, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT }, Shortcut() }, testApp2 } }); // Case 2 : Validate the element when selecting Shift (VK_SHIFT) on second dropdown of first column with Ctrl+Empty+C for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, testApp2 } }); // Case 3 : Validate the element when selecting Shift (VK_SHIFT) on first dropdown of first column with Empty+Ctrl+C for testApp2 - testCases.push_back({ 1, 0, 0, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, testApp2 } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange RemapBuffer remapBuffer; // Ctrl+Shift+C remapped for testApp1 - remapBuffer.push_back(std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp1)); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp1 }); remapBuffer.push_back(testCase.bufferRow); // Act @@ -1175,17 +1175,17 @@ namespace RemappingUITests { std::vector testCases; // Case 1 : Validate the element when selecting C (0x43) on third dropdown of first column with LCtrl+Shift+Empty - testCases.push_back({ 1, 0, 2, std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 2, std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT }, Shortcut() }, std::wstring() } }); // Case 2 : Validate the element when selecting Shift (VK_SHIFT) on second dropdown of first column with LCtrl+Empty+C - testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL, 0x43 }, Shortcut() }, std::wstring() } }); // Case 3 : Validate the element when selecting LShift (VK_LSHIFT) on first dropdown of first column with Empty+Ctrl+C - testCases.push_back({ 1, 0, 0, std::vector{ VK_LSHIFT, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_LSHIFT, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange RemapBuffer remapBuffer; // Ctrl+Shift+C remapped - remapBuffer.push_back(std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring() }); remapBuffer.push_back(testCase.bufferRow); // Act @@ -1201,17 +1201,17 @@ namespace RemappingUITests { std::vector testCases; // Case 1 : Validate the element when selecting C (0x43) on third dropdown of first column with LCtrl+Shift+Empty for testApp2 - testCases.push_back({ 1, 0, 2, std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 2, std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT }, Shortcut() }, testApp2 } }); // Case 2 : Validate the element when selecting Shift (VK_SHIFT) on second dropdown of first column with LCtrl+Empty+C for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL, 0x43 }, Shortcut() }, testApp2 } }); // Case 3 : Validate the element when selecting LShift (VK_LSHIFT) on first dropdown of first column with Empty+Ctrl+C for testApp2 - testCases.push_back({ 1, 0, 0, std::vector{ VK_LSHIFT, VK_CONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_LSHIFT, VK_CONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, testApp2 } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange RemapBuffer remapBuffer; // Ctrl+Shift+C remapped for testApp1 - remapBuffer.push_back(std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp1)); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp1 }); remapBuffer.push_back(testCase.bufferRow); // Act @@ -1227,31 +1227,31 @@ namespace RemappingUITests { std::vector testCases; // Case 1 : Validate the element when selecting C (0x43) on second dropdown of first column with Ctrl+Empty - testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, std::wstring() } }); // Case 2 : Validate the element when selecting C (0x43) on third dropdown of first column with Ctrl+Empty+Empty - testCases.push_back({ 1, 0, 2, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 2, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, std::wstring() } }); // Case 3 : Validate the element when selecting C (0x43) on second dropdown of first column with Ctrl+Empty+Empty - testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0x43, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0x43, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, std::wstring() } }); // Case 4 : Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of first column with Empty+C - testCases.push_back({ 1, 0, 0, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring() } }); // Case 5 : Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of first column with Empty+Empty+C - testCases.push_back({ 1, 0, 0, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring() } }); // Case 6 : Validate the element when selecting Ctrl (VK_CONTROL) on second dropdown of first column with Empty+Empty+C - testCases.push_back({ 1, 0, 1, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring() } }); // Case 7 : Validate the element when selecting Null (-1) on second dropdown of first column with Ctrl+Shift+C - testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring() } }); // Case 8 : Validate the element when selecting Null (-1) on first dropdown of first column with Shift+Ctrl+C - testCases.push_back({ 1, 0, 0, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 0, std::vector{ -1, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, Shortcut() }, std::wstring() } }); // Case 9 : Validate the element when selecting None (0) on second dropdown of first column with Ctrl+Shift+C - testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring() } }); // Case 10 : Validate the element when selecting None (0) on first dropdown of first column with Shift+Ctrl+C - testCases.push_back({ 1, 0, 0, std::vector{ 0, VK_CONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 0, std::vector{ 0, VK_CONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, Shortcut() }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange RemapBuffer remapBuffer; // Ctrl+C remapped - remapBuffer.push_back(std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, std::wstring() }); remapBuffer.push_back(testCase.bufferRow); // Act @@ -1267,31 +1267,31 @@ namespace RemappingUITests { std::vector testCases; // Case 1 : Validate the element when selecting C (0x43) on second dropdown of first column with Ctrl+Empty for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, testApp2 } }); // Case 2 : Validate the element when selecting C (0x43) on third dropdown of first column with Ctrl+Empty+Empty for testApp2 - testCases.push_back({ 1, 0, 2, std::vector{ VK_CONTROL, -1, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 2, std::vector{ VK_CONTROL, -1, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, testApp2 } }); // Case 3 : Validate the element when selecting C (0x43) on second dropdown of first column with Ctrl+Empty+Empty for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0x43, -1 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0x43, -1 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL }, Shortcut() }, testApp2 } }); // Case 4 : Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of first column with Empty+C for testApp2 - testCases.push_back({ 1, 0, 0, std::vector{ VK_CONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_CONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2 } }); // Case 5 : Validate the element when selecting Ctrl (VK_CONTROL) on first dropdown of first column with Empty+Empty+C for testApp2 - testCases.push_back({ 1, 0, 0, std::vector{ VK_CONTROL, -1, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_CONTROL, -1, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2 } }); // Case 6 : Validate the element when selecting Ctrl (VK_CONTROL) on second dropdown of first column with Empty+Empty+C for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ -1, VK_CONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ -1, VK_CONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2 } }); // Case 7 : Validate the element when selecting Null (-1) on second dropdown of first column with Ctrl+Shift+C for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, -1, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, -1, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp2 } }); // Case 8 : Validate the element when selecting Null (-1) on first dropdown of first column with Shift+Ctrl+C for testApp2 - testCases.push_back({ 1, 0, 0, std::vector{ -1, VK_CONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 0, std::vector{ -1, VK_CONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, Shortcut() }, testApp2 } }); // Case 9 : Validate the element when selecting None (0) on second dropdown of first column with Ctrl+Shift+C for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_CONTROL, 0, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp2 } }); // Case 10 : Validate the element when selecting None (0) on first dropdown of first column with Shift+Ctrl+C for testApp2 - testCases.push_back({ 1, 0, 0, std::vector{ 0, VK_CONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 0, std::vector{ 0, VK_CONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, VK_CONTROL, 0x43 }, Shortcut() }, testApp2 } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange RemapBuffer remapBuffer; // Ctrl+C remapped for testApp1 - remapBuffer.push_back(std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, testApp1)); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, testApp1 }); remapBuffer.push_back(testCase.bufferRow); // Act @@ -1307,31 +1307,31 @@ namespace RemappingUITests { std::vector testCases; // Case 1 : Validate the element when selecting C (0x43) on second dropdown of first column with LCtrl+Empty - testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, std::wstring() } }); // Case 2 : Validate the element when selecting C (0x43) on third dropdown of first column with LCtrl+Empty+Empty - testCases.push_back({ 1, 0, 2, std::vector{ VK_LCONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 2, std::vector{ VK_LCONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, std::wstring() } }); // Case 3 : Validate the element when selecting C (0x43) on second dropdown of first column with LCtrl+Empty+Empty - testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0x43, -1 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0x43, -1 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, std::wstring() } }); // Case 4 : Validate the element when selecting LCtrl (VK_LCONTROL) on first dropdown of first column with Empty+C - testCases.push_back({ 1, 0, 0, std::vector{ VK_LCONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_LCONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring() } }); // Case 5 : Validate the element when selecting LCtrl (VK_LCONTROL) on first dropdown of first column with Empty+Empty+C - testCases.push_back({ 1, 0, 0, std::vector{ VK_LCONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_LCONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring() } }); // Case 6 : Validate the element when selecting LCtrl (VK_LCONTROL) on second dropdown of first column with Empty+Empty+C - testCases.push_back({ 1, 0, 1, std::vector{ -1, VK_LCONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ -1, VK_LCONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, std::wstring() } }); // Case 7 : Validate the element when selecting Null (-1) on second dropdown of first column with LCtrl+Shift+C - testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, -1, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, -1, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring() } }); // Case 8 : Validate the element when selecting Null (-1) on first dropdown of first column with Shift+LCtrl+C - testCases.push_back({ 1, 0, 0, std::vector{ -1, VK_LCONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, VK_LCONTROL, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 0, std::vector{ -1, VK_LCONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, VK_LCONTROL, 0x43 }, Shortcut() }, std::wstring() } }); // Case 9 : Validate the element when selecting None (0) on second dropdown of first column with LCtrl+Shift+C - testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, Shortcut() }, std::wstring() } }); // Case 10 : Validate the element when selecting None (0) on first dropdown of first column with Shift+LCtrl+C - testCases.push_back({ 1, 0, 0, std::vector{ 0, VK_LCONTROL, 0x43 }, std::wstring(), false, std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, VK_LCONTROL, 0x43 }, Shortcut() }, std::wstring()) }); + testCases.push_back({ 1, 0, 0, std::vector{ 0, VK_LCONTROL, 0x43 }, std::wstring(), false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, VK_LCONTROL, 0x43 }, Shortcut() }, std::wstring() } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange RemapBuffer remapBuffer; // Ctrl+C remapped - remapBuffer.push_back(std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, std::wstring() }); remapBuffer.push_back(testCase.bufferRow); // Act @@ -1347,31 +1347,31 @@ namespace RemappingUITests { std::vector testCases; // Case 1 : Validate the element when selecting C (0x43) on second dropdown of first column with LCtrl+Empty for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, testApp2 } }); // Case 2 : Validate the element when selecting C (0x43) on third dropdown of first column with LCtrl+Empty+Empty for testApp2 - testCases.push_back({ 1, 0, 2, std::vector{ VK_LCONTROL, -1, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 2, std::vector{ VK_LCONTROL, -1, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, testApp2 } }); // Case 3 : Validate the element when selecting C (0x43) on second dropdown of first column with LCtrl+Empty+Empty for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0x43, -1 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0x43, -1 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL }, Shortcut() }, testApp2 } }); // Case 4 : Validate the element when selecting LCtrl (VK_LCONTROL) on first dropdown of first column with Empty+C for testApp2 - testCases.push_back({ 1, 0, 0, std::vector{ VK_LCONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_LCONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2 } }); // Case 5 : Validate the element when selecting LCtrl (VK_LCONTROL) on first dropdown of first column with Empty+Empty+C for testApp2 - testCases.push_back({ 1, 0, 0, std::vector{ VK_LCONTROL, -1, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 0, std::vector{ VK_LCONTROL, -1, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2 } }); // Case 6 : Validate the element when selecting LCtrl (VK_LCONTROL) on second dropdown of first column with Empty+Empty+C for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ -1, VK_LCONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ -1, VK_LCONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ 0x43 }, Shortcut() }, testApp2 } }); // Case 7 : Validate the element when selecting Null (-1) on second dropdown of first column with LCtrl+Shift+C for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, -1, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, -1, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp2 } }); // Case 8 : Validate the element when selecting Null (-1) on first dropdown of first column with Shift+LCtrl+C for testApp2 - testCases.push_back({ 1, 0, 0, std::vector{ -1, VK_LCONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, VK_LCONTROL, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 0, std::vector{ -1, VK_LCONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, VK_LCONTROL, 0x43 }, Shortcut() }, testApp2 } }); // Case 9 : Validate the element when selecting None (0) on second dropdown of first column with LCtrl+Shift+C for testApp2 - testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 1, std::vector{ VK_LCONTROL, 0, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_LCONTROL, VK_SHIFT, 0x43 }, Shortcut() }, testApp2 } }); // Case 10 : Validate the element when selecting None (0) on first dropdown of first column with Shift+LCtrl+C for testApp2 - testCases.push_back({ 1, 0, 0, std::vector{ 0, VK_LCONTROL, 0x43 }, testApp2, false, std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, VK_LCONTROL, 0x43 }, Shortcut() }, testApp2) }); + testCases.push_back({ 1, 0, 0, std::vector{ 0, VK_LCONTROL, 0x43 }, testApp2, false, RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, VK_LCONTROL, 0x43 }, Shortcut() }, testApp2 } }); RunTestCases(testCases, [this](const ValidateShortcutBufferElementArgs& testCase) { // Arrange RemapBuffer remapBuffer; // Ctrl+C remapped for testApp1 - remapBuffer.push_back(std::make_pair(RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, testApp1)); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ std::vector{ VK_CONTROL, 0x43 }, Shortcut() }, testApp1 }); remapBuffer.push_back(testCase.bufferRow); // Act @@ -1387,7 +1387,7 @@ namespace RemappingUITests { // Arrange RemapBuffer remapBuffer; - remapBuffer.push_back(std::make_pair(RemapBufferItem{ std::vector{ VK_SHIFT, CommonSharedConstants::VK_DISABLED }, Shortcut() }, testApp1)); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem{ std::vector{ VK_SHIFT, CommonSharedConstants::VK_DISABLED }, Shortcut() }, testApp1 }); std::vector selectedCodes = { VK_SHIFT, CommonSharedConstants::VK_DISABLED diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorTest/LoadingAndSavingRemappingTests.cpp b/src/modules/keyboardmanager/KeyboardManagerEditorTest/LoadingAndSavingRemappingTests.cpp index 9ebf71c4b2..aadeade6a5 100644 --- a/src/modules/keyboardmanager/KeyboardManagerEditorTest/LoadingAndSavingRemappingTests.cpp +++ b/src/modules/keyboardmanager/KeyboardManagerEditorTest/LoadingAndSavingRemappingTests.cpp @@ -42,8 +42,8 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Remap A to B and B to C - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x42, (DWORD)0x43 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x42, (DWORD)0x43 }), std::wstring() }); // Assert that remapping set is valid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::NoError); @@ -62,8 +62,8 @@ namespace RemappingUITests Shortcut s2; s2.SetKey(VK_MENU); s2.SetKey(VK_TAB); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, s1 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x42, s2 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, s1 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x42, s2 }), std::wstring() }); // Assert that remapping set is valid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::NoError); @@ -82,8 +82,8 @@ namespace RemappingUITests Shortcut s2; s2.SetKey(VK_MENU); s2.SetKey(VK_TAB); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ s1, (DWORD)0x41 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ s2, (DWORD)0x42 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ s1, (DWORD)0x41 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ s2, (DWORD)0x42 }), std::wstring() }); // Assert that remapping set is valid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::NoError); @@ -108,8 +108,8 @@ namespace RemappingUITests Shortcut dest2; dest2.SetKey(CommonSharedConstants::VK_WIN_BOTH); dest2.SetKey(0x41); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src1, dest1 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src2, dest2 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src1, dest1 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src2, dest2 }), std::wstring() }); // Assert that remapping set is valid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::NoError); @@ -134,10 +134,10 @@ namespace RemappingUITests Shortcut dest2; dest2.SetKey(CommonSharedConstants::VK_WIN_BOTH); dest2.SetKey(0x41); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src1, dest1 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src2, (DWORD)0x41 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x42, dest2 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src1, dest1 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src2, (DWORD)0x41 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x42, dest2 }), std::wstring() }); // Assert that remapping set is valid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::NoError); @@ -150,7 +150,7 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Remap A to NULL - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, (DWORD)0 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, (DWORD)0 }), std::wstring() }); // Assert that remapping set is invalid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::RemapUnsuccessful); @@ -165,7 +165,7 @@ namespace RemappingUITests // Remap A to incomplete shortcut (Ctrl) Shortcut src1; src1.SetKey(VK_CONTROL); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, src1 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, src1 }), std::wstring() }); // Assert that remapping set is invalid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::RemapUnsuccessful); @@ -181,8 +181,8 @@ namespace RemappingUITests Shortcut src1; src1.SetKey(VK_CONTROL); src1.SetKey(0x43); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, src1 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, src1 }), std::wstring() }); // Assert that remapping set is invalid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::RemapUnsuccessful); @@ -201,8 +201,8 @@ namespace RemappingUITests Shortcut dest1; dest1.SetKey(VK_CONTROL); dest1.SetKey(0x56); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src1, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src1, dest1 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src1, (DWORD)0x42 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src1, dest1 }), std::wstring() }); // Assert that remapping set is invalid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::RemapUnsuccessful); @@ -221,8 +221,8 @@ namespace RemappingUITests Shortcut dest1; dest1.SetKey(VK_CONTROL); dest1.SetKey(0x56); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src1, (DWORD)0x42 }), testApp1)); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src1, dest1 }), testApp1)); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src1, (DWORD)0x42 }), testApp1 }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src1, dest1 }), testApp1 }); // Assert that remapping set is invalid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::RemapUnsuccessful); @@ -241,8 +241,8 @@ namespace RemappingUITests Shortcut dest1; dest1.SetKey(VK_CONTROL); dest1.SetKey(0x56); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src1, (DWORD)0x42 }), testApp1)); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src1, dest1 }), testApp2)); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src1, (DWORD)0x42 }), testApp1 }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src1, dest1 }), testApp2 }); // Assert that remapping set is valid bool isSuccess = (LoadingAndSavingRemappingHelper::CheckIfRemappingsAreValid(remapBuffer) == ShortcutErrorType::NoError); @@ -264,7 +264,7 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Remap A to B - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring() }); // Assert that only A is orphaned Assert::AreEqual((size_t)1, LoadingAndSavingRemappingHelper::GetOrphanedKeys(remapBuffer).size()); @@ -277,8 +277,8 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Remap A to B and B to A - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x42, (DWORD)0x41 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x42, (DWORD)0x41 }), std::wstring() }); // Assert that there are no orphaned keys Assert::AreEqual(true, LoadingAndSavingRemappingHelper::GetOrphanedKeys(remapBuffer).empty()); @@ -293,8 +293,8 @@ namespace RemappingUITests Shortcut dest1; dest1.SetKey(VK_CONTROL); dest1.SetKey(0x42); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, dest1 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x43, (DWORD)0x41 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, dest1 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x43, (DWORD)0x41 }), std::wstring() }); // Assert that only C is orphaned Assert::AreEqual((size_t)1, LoadingAndSavingRemappingHelper::GetOrphanedKeys(remapBuffer).size()); @@ -391,10 +391,10 @@ namespace RemappingUITests s1.SetKey(0x56); Shortcut s2; s2.SetKey(VK_LMENU); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x42, s1 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x43, (DWORD)0 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)0x44, s2 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x41, (DWORD)0x42 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x42, s1 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x43, (DWORD)0 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)0x44, s2 }), std::wstring() }); // Apply the single key remaps from the buffer to the keyboard manager state variable LoadingAndSavingRemappingHelper::ApplySingleKeyRemappings(testShortcuts, remapBuffer, false); @@ -415,10 +415,10 @@ namespace RemappingUITests RemapBuffer remapBuffer; // Add Ctrl->A, Alt->B, Shift->C and Win->D remappings to the buffer - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)VK_CONTROL, (DWORD)0x41 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)VK_MENU, (DWORD)0x42 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)VK_SHIFT, (DWORD)0x43 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ (DWORD)CommonSharedConstants::VK_WIN_BOTH, (DWORD)0x44 }), std::wstring())); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)VK_CONTROL, (DWORD)0x41 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)VK_MENU, (DWORD)0x42 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)VK_SHIFT, (DWORD)0x43 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ (DWORD)CommonSharedConstants::VK_WIN_BOTH, (DWORD)0x44 }), std::wstring() }); // Apply the single key remaps from the buffer to the keyboard manager state variable LoadingAndSavingRemappingHelper::ApplySingleKeyRemappings(testShortcuts, remapBuffer, false); @@ -496,14 +496,14 @@ namespace RemappingUITests src4.SetKey(0x47); Shortcut dest4; dest4.SetKey(VK_CONTROL); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src1, dest1 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src2, dest2 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src3, (DWORD)0 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src4, dest4 }), std::wstring())); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src3, dest2 }), testApp1)); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src4, dest1 }), testApp1)); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src1, (DWORD)0 }), testApp1)); - remapBuffer.push_back(std::make_pair(RemapBufferItem({ src2, dest4 }), testApp1)); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src1, dest1 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src2, dest2 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src3, (DWORD)0 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src4, dest4 }), std::wstring() }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src3, dest2 }), testApp1 }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src4, dest1 }), testApp1 }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src1, (DWORD)0 }), testApp1 }); + remapBuffer.push_back(RemapBufferRow{ RemapBufferItem({ src2, dest4 }), testApp1 }); // Apply the shortcut remaps from the buffer to the keyboard manager state variable LoadingAndSavingRemappingHelper::ApplyShortcutRemappings(testShortcuts, remapBuffer, false);