docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TextEditorTests

    Inheritance
    object
    TextEditorTests
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Global Namespace
    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()
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)