Class TextEditorTests
Inheritance
TextEditorTests
Assembly: UnityEngine.UI.Tests.dll
Syntax
public class TextEditorTests
Methods
Backspace_RemovesCodePointLeftOfCursor(string, int[])
Declaration
[Test]
[TestCaseSource("textWithCodePointBoundaryIndices")]
public void Backspace_RemovesCodePointLeftOfCursor(string text, int[] codePointIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
codePointIndices |
|
DeleteWordBack_DeletesBackToPreviousWordStart(string, int[], int[])
Declaration
[Test]
[TestCaseSource("textWithWordStartAndEndIndices")]
[TestCaseSource("textWithWordStartAndEndIndicesWherePunctuationIsAWord")]
public void DeleteWordBack_DeletesBackToPreviousWordStart(string text, int[] wordStartIndices, int[] wordEndIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
wordStartIndices |
|
int[] |
wordEndIndices |
|
DeleteWordForward_DeletesForwardToNextWordStart(string, int[], int[])
Declaration
[Test]
[TestCaseSource("textWithWordStartAndEndIndices")]
[TestCaseSource("textWithWordStartAndEndIndicesWherePunctuationIsAWord")]
public void DeleteWordForward_DeletesForwardToNextWordStart(string text, int[] wordStartIndices, int[] wordEndIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
wordStartIndices |
|
int[] |
wordEndIndices |
|
Delete_RemovesCodePointRightOfCursor(string, int[])
Declaration
[Test]
[TestCaseSource("textWithCodePointBoundaryIndices")]
public void Delete_RemovesCodePointRightOfCursor(string text, int[] codePointIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
codePointIndices |
|
FindStartOfNextWord_ReturnsIndexOfNextWordStart(string, int[], int[])
Declaration
[Test]
[TestCaseSource("textWithWordStartAndEndIndices")]
[TestCaseSource("textWithWordStartAndEndIndicesWherePunctuationIsAWord")]
public void FindStartOfNextWord_ReturnsIndexOfNextWordStart(string text, int[] wordStartIndices, int[] wordEndIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
wordStartIndices |
|
int[] |
wordEndIndices |
|
HandleKeyEvent_WithCommandAKeyDownEvent_SelectsAllOnMacOS()
Declaration
[Test]
public void HandleKeyEvent_WithCommandAKeyDownEvent_SelectsAllOnMacOS()
HandleKeyEvent_WithControlAKeyDownEvent_MovesCursorToStartOfLineOnMacOS_SelectsAllElsewhere()
Declaration
[Test]
public void HandleKeyEvent_WithControlAKeyDownEvent_MovesCursorToStartOfLineOnMacOS_SelectsAllElsewhere()
MoveLeft_SkipsInvalidCodePointIndices(string, int[])
Declaration
[Test]
[TestCaseSource("textWithCodePointBoundaryIndices")]
public void MoveLeft_SkipsInvalidCodePointIndices(string text, int[] codePointIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
codePointIndices |
|
MoveLineEnd_MovesCursorBeforeNextLineFeed(string, int[])
Declaration
[Test]
[TestCaseSource("textWithLineEndIndices")]
public void MoveLineEnd_MovesCursorBeforeNextLineFeed(string text, int[] lineEndIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
lineEndIndices |
|
MoveLineStart_MovesCursorAfterPreviousLineFeed(string, int[])
Declaration
[Test]
[TestCaseSource("textWithLineStartIndices")]
public void MoveLineStart_MovesCursorAfterPreviousLineFeed(string text, int[] lineStartIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
lineStartIndices |
|
MoveRight_SkipsInvalidCodePointIndices(string, int[])
Declaration
[Test]
[TestCaseSource("textWithCodePointBoundaryIndices")]
public void MoveRight_SkipsInvalidCodePointIndices(string text, int[] codePointIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
codePointIndices |
|
MoveTextEnd_MovesCursorToEndOfText()
Declaration
[Test]
public void MoveTextEnd_MovesCursorToEndOfText()
MoveTextStart_MovesCursorToStartOfText()
Declaration
[Test]
public void MoveTextStart_MovesCursorToStartOfText()
MoveToEndOfPreviousWord_MovesCursorToPreviousWordStart(string, int[], int[])
Declaration
[Test]
[TestCaseSource("textWithWordStartAndEndIndices")]
[TestCaseSource("textWithWordStartAndEndIndicesWherePunctuationIsAWord")]
public void MoveToEndOfPreviousWord_MovesCursorToPreviousWordStart(string text, int[] wordStartIndices, int[] wordEndIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
wordStartIndices |
|
int[] |
wordEndIndices |
|
MoveToStartOfNextWord_MovesCursorToNextWordStart(string, int[], int[])
Declaration
[Test]
[TestCaseSource("textWithWordStartAndEndIndices")]
[TestCaseSource("textWithWordStartAndEndIndicesWherePunctuationIsAWord")]
public void MoveToStartOfNextWord_MovesCursorToNextWordStart(string text, int[] wordStartIndices, int[] wordEndIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
wordStartIndices |
|
int[] |
wordEndIndices |
|
MoveWordLeft_MovesCursorToPreviousWordStart(string, int[], int[])
Declaration
[Test]
[TestCaseSource("textWithWordStartAndEndIndices")]
[TestCaseSource("textWithWordStartAndEndIndicesWherePunctuationIsNotAWord")]
public void MoveWordLeft_MovesCursorToPreviousWordStart(string text, int[] wordStartIndices, int[] wordEndIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
wordStartIndices |
|
int[] |
wordEndIndices |
|
MoveWordRight_MovesCursorToNextWordEnd(string, int[], int[])
Declaration
[Test]
[TestCaseSource("textWithWordStartAndEndIndices")]
[TestCaseSource("textWithWordStartAndEndIndicesWherePunctuationIsNotAWord")]
public void MoveWordRight_MovesCursorToNextWordEnd(string text, int[] wordStartIndices, int[] wordEndIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
wordStartIndices |
|
int[] |
wordEndIndices |
|
SelectCurrentWord(string, int[], int[])
Declaration
[Test]
[TestCaseSource("textWithExpectedCursorAndSelectIndicesWhenSelectingCurrentWordAtIndex")]
public void SelectCurrentWord(string text, int[] expectedCursorIndices, int[] expectedSelectIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
expectedCursorIndices |
|
int[] |
expectedSelectIndices |
|
SelectLeft_ExpandSelectionToPreviousCodePoint(string, int[])
Declaration
[Test]
[TestCaseSource("textWithCodePointBoundaryIndices")]
public void SelectLeft_ExpandSelectionToPreviousCodePoint(string text, int[] codePointIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
codePointIndices |
|
SelectRight_ExpandSelectionToNextCodePoint(string, int[])
Declaration
[Test]
[TestCaseSource("textWithCodePointBoundaryIndices")]
public void SelectRight_ExpandSelectionToNextCodePoint(string text, int[] codePointIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
codePointIndices |
|
SetCursorAndSelectIndices_MovesToNextCodePointIndexIfInvalid(string, int[])
Declaration
[Test]
[TestCaseSource("textWithCodePointBoundaryIndices")]
public void SetCursorAndSelectIndices_MovesToNextCodePointIndexIfInvalid(string text, int[] codePointIndices)
Parameters
Type |
Name |
Description |
string |
text |
|
int[] |
codePointIndices |
|
SetText_MovesCursorAndSelectIndicesToNextCodePointIndexIfInvalid()
Declaration
[Test]
public void SetText_MovesCursorAndSelectIndicesToNextCodePointIndexIfInvalid()
TestSetup()
Declaration
[SetUp]
public void TestSetup()
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.