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

Move ConPTY to use til::bitmap #5024

Merged
28 commits merged into from
Mar 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d637178
bring bitmap and supporting rectangle mods over, implement more bitma…
miniksa Mar 17, 2020
70567d4
Make bitmap tests. Add supplemental helpers to rectangle and some, al…
miniksa Mar 17, 2020
69b44ae
Add tests for setting/resetting points/rectangles out of bounds. Add …
miniksa Mar 17, 2020
fca07fa
code format pass.
miniksa Mar 17, 2020
79d1f33
Don't include stuff at the top of bitmap. Don't use reserved naming f…
miniksa Mar 17, 2020
81af5aa
Fix comment
miniksa Mar 17, 2020
09139c4
SA fixes.
miniksa Mar 17, 2020
43f952c
Change the entire interface to just use til::rectangle.
miniksa Mar 17, 2020
de20c5a
make bitmap track a rectangle inside. remove empty and add bitset met…
miniksa Mar 18, 2020
a86b8fa
Some frees members, some comments about the rectangle iterator and mo…
miniksa Mar 18, 2020
c4df795
Make resize work and add tests. Add constructors that let you allocat…
miniksa Mar 18, 2020
824657f
Static analysis pass.
miniksa Mar 18, 2020
e3fe53d
Merge branch 'master' into dev/miniksa/til_bitmap
miniksa Mar 18, 2020
d7cf7d6
Merge branch 'dev/miniksa/til_bitmap' into dev/miniksa/til_bitmap_pty
miniksa Mar 18, 2020
83e28f9
Add run caching to bitmap, make iterator into real input iterator so …
miniksa Mar 19, 2020
d705527
Set up string printing for til types, use that inside the TAEF string…
miniksa Mar 19, 2020
95b9b85
Operators on rectangle with points and sizes, operators between point…
miniksa Mar 19, 2020
31eadef
finish xterm engine changes, make tests work again with the new inval…
miniksa Mar 19, 2020
873a612
Merge branch 'master' into dev/miniksa/til_bitmap_pty
miniksa Mar 19, 2020
0651df1
SA pass and code format.
miniksa Mar 19, 2020
cf06e97
inclusive/exclusive mismatch! *shakes fist at sky*
miniksa Mar 19, 2020
59bfce1
Update simple tests to compensate for optimized invalidation rectangle.
miniksa Mar 19, 2020
a48919e
Remove testing for clear/paint of non-dirty regions (per new algorithm)
miniksa Mar 19, 2020
54ce99e
Fix the vt renderer tests to use the correct expected invalid rectang…
miniksa Mar 20, 2020
8647ae0
Format pass.
miniksa Mar 20, 2020
0fc48b9
PR feedback. Restoring non-optional dirty. Removing some leftover com…
miniksa Mar 20, 2020
7a5a3d3
tabs to spaces
miniksa Mar 20, 2020
91c11d9
fix the til bitmap and tests for removing the optional... I swear I c…
miniksa Mar 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,17 +347,14 @@ void ConptyRoundtripTests::WriteAFewSimpleLines()
expectedOutput.push_back("AAA");
expectedOutput.push_back("\r\n");
expectedOutput.push_back("BBB");
expectedOutput.push_back("\r\n");
// Here, we're going to emit 3 spaces. The region that got invalidated was a
// rectangle from 0,0 to 3,3, so the vt renderer will try to render the
// region in between BBB and CCC as well, because it got included in the
// rectangle Or() operation.
// This behavior should not be seen as binding - if a future optimization
// breaks this test, it wouldn't be the worst.
expectedOutput.push_back(" ");
expectedOutput.push_back("\r\n");
// Jump down to the fourth line because emitting spaces didn't do anything
// and we will skip to emitting the CCC segment.
expectedOutput.push_back("\x1b[4;1H");
expectedOutput.push_back("CCC");

// Cursor goes back on.
expectedOutput.push_back("\x1b[?25h");

VERIFY_SUCCEEDED(renderer.PaintFrame());

verifyData(termTb);
Expand Down Expand Up @@ -458,14 +455,10 @@ void ConptyRoundtripTests::TestAdvancedWrapping()
expectedOutput.push_back(R"(!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop)");
// Without line breaking, write the remaining 20 chars
expectedOutput.push_back(R"(qrstuvwxyz{|}~!"#$%&)");
// Clear the rest of row 1
expectedOutput.push_back("\x1b[K");
miniksa marked this conversation as resolved.
Show resolved Hide resolved
// This is the hard line break
expectedOutput.push_back("\r\n");
// Now write row 2 of the buffer
expectedOutput.push_back(" 1234567890");
// and clear everything after the text, because the buffer is empty.
expectedOutput.push_back("\x1b[K");
VERIFY_SUCCEEDED(renderer.PaintFrame());

verifyBuffer(termTb);
Expand Down Expand Up @@ -537,8 +530,6 @@ void ConptyRoundtripTests::TestExactWrappingWithoutSpaces()
expectedOutput.push_back("\r\n");
// Now write row 2 of the buffer
expectedOutput.push_back("1234567890");
// and clear everything after the text, because the buffer is empty.
expectedOutput.push_back("\x1b[K");
VERIFY_SUCCEEDED(renderer.PaintFrame());

verifyBuffer(termTb);
Expand Down Expand Up @@ -601,8 +592,6 @@ void ConptyRoundtripTests::TestExactWrappingWithSpaces()
expectedOutput.push_back("\r\n");
// Now write row 2 of the buffer
expectedOutput.push_back(" 1234567890");
// and clear everything after the text, because the buffer is empty.
expectedOutput.push_back("\x1b[K");
VERIFY_SUCCEEDED(renderer.PaintFrame());

verifyBuffer(termTb);
Expand Down
2 changes: 1 addition & 1 deletion src/common.build.tests.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>UNIT_TESTING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>INLINE_TEST_METHOD_MARKUP;UNIT_TESTING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(MSBuildThisFileDirectory)..\packages\Taef.Redist.Wlk.10.51.200127004\build\Taef.Redist.Wlk.targets" Condition="Exists('$(MSBuildThisFileDirectory)..\packages\Taef.Redist.Wlk.10.51.200127004\build\Taef.Redist.Wlk.targets')" />
Expand Down
15 changes: 6 additions & 9 deletions src/host/ut_host/ConptyOutputTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,17 +306,14 @@ void ConptyOutputTests::WriteAFewSimpleLines()
expectedOutput.push_back("AAA");
expectedOutput.push_back("\r\n");
expectedOutput.push_back("BBB");
expectedOutput.push_back("\r\n");
// Here, we're going to emit 3 spaces. The region that got invalidated was a
// rectangle from 0,0 to 3,3, so the vt renderer will try to render the
// region in between BBB and CCC as well, because it got included in the
// rectangle Or() operation.
// This behavior should not be seen as binding - if a future optimization
// breaks this test, it wouldn't be the worst.
expectedOutput.push_back(" ");
expectedOutput.push_back("\r\n");
// Jump down to the fourth line because emitting spaces didn't do anything
// and we will skip to emitting the CCC segment.
expectedOutput.push_back("\x1b[4;1H");
expectedOutput.push_back("CCC");

// Cursor goes back on.
expectedOutput.push_back("\x1b[?25h");

VERIFY_SUCCEEDED(renderer.PaintFrame());
}

Expand Down
Loading