Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] Add test for subparameter based GraphicOptions #15844

Merged
merged 3 commits into from Aug 21, 2023

Conversation

tusharsnx
Copy link
Contributor

@tusharsnx tusharsnx commented Aug 17, 2023

Add test for subparameter based GraphicOptions.

GraphicsSingleWithSubParamTests is added for subparameter based GraphicOptions. This should've been included with #15729.

Also, while working on #15795, I realized creating and passing subparameters for the tests is painful right now. I've added a small util MakeSubParamsAndRanges(...) that eases creating subparameters and subparameter ranges from a simple list of (lists of) subparameters.

Validation Steps Performed

  • All tests passed.

@tusharsnx tusharsnx changed the title [Tests] Add a util to generate subparameters and ranges [Tests] Add test for subparameter based GraphicOptions Aug 18, 2023
@@ -332,6 +332,24 @@ class TestGetSet final : public ITerminalApi
_expectedCursorPos = cursorPos;
}

static void MakeSubParamsAndRanges(std::initializer_list<std::initializer_list<const VTParameter>> subParamList, _Out_ std::vector<VTParameter>& subParams, _Out_ std::vector<std::pair<BYTE, BYTE>>& subParamRanges)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i love it!

@zadjii-msft zadjii-msft merged commit 21c2dee into microsoft:main Aug 21, 2023
14 checks passed
@tusharsnx tusharsnx deleted the add-util branch August 22, 2023 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants