-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove IsGlyphFullWidth from InputBuffer
- Loading branch information
Showing
2 changed files
with
11 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,22 +219,19 @@ class InputBufferTests | |
} | ||
} | ||
|
||
TEST_METHOD(InputBufferDoesNotCoalesceFullWidthChars) | ||
TEST_METHOD(InputBufferDoesNotCoalesceSurrogatePairs) | ||
{ | ||
InputBuffer inputBuffer; | ||
WCHAR hiraganaA = 0x3042; // U+3042 hiragana A | ||
auto record = MakeKeyEvent(true, 1, hiraganaA, 0, hiraganaA, 0); | ||
|
||
// send a bunch of identical events | ||
inputBuffer.Flush(); | ||
for (size_t i = 0; i < RECORD_INSERT_COUNT; ++i) | ||
{ | ||
VERIFY_IS_GREATER_THAN(inputBuffer.Write(record), 0u); | ||
VERIFY_ARE_EQUAL(inputBuffer._storage.back(), record); | ||
} | ||
// U+1F44D thumbs up emoji | ||
inputBuffer.Write(MakeKeyEvent(true, 1, 0xD83D, 0, 0xD83D, 0)); | ||
inputBuffer.Write(MakeKeyEvent(true, 1, 0xDC4D, 0, 0xDC4D, 0)); | ||
|
||
// Should not coalese despite otherwise matching perfectly. | ||
Check failure Code scanning / check-spelling Unrecognized Spelling Error
coalese is not a recognized word. (unrecognized-spelling)
|
||
inputBuffer.Write(MakeKeyEvent(true, 1, 0xDC4D, 0, 0xDC4D, 0)); | ||
|
||
// The events shouldn't be coalesced | ||
VERIFY_ARE_EQUAL(inputBuffer.GetNumberOfReadyEvents(), RECORD_INSERT_COUNT); | ||
VERIFY_ARE_EQUAL(inputBuffer.GetNumberOfReadyEvents(), 3); | ||
} | ||
|
||
TEST_METHOD(CanFlushAllOutput) | ||
|