From 3af4e65575dba236c3a670a129571ffa99a0f40b Mon Sep 17 00:00:00 2001 From: Benedikt Schroeder Date: Thu, 23 Jul 2020 10:53:02 +0200 Subject: [PATCH] Remove redundant tests --- .../Media/TextFormatting/TextLineTests.cs | 70 ------------------- 1 file changed, 70 deletions(-) diff --git a/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLineTests.cs b/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLineTests.cs index 575a58f337..3655d78c9d 100644 --- a/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLineTests.cs +++ b/tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLineTests.cs @@ -273,76 +273,6 @@ namespace Avalonia.Skia.UnitTests.Media.TextFormatting } } - [Fact] - public void TestNext() - { - using (Start()) - { - var defaultProperties = new GenericTextRunProperties(Typeface.Default); - - var textSource = new SingleBufferTextSource("Text from memory", defaultProperties); - - var formatter = new TextFormatterImpl(); - - var textLine = - formatter.FormatLine(textSource, 0, double.PositiveInfinity, - new GenericTextParagraphProperties(defaultProperties)); - - var characterHits = new List(); - - var currentCharacterHit = new CharacterHit(0); - - characterHits.Add(currentCharacterHit); - - var nextCharacterHit = textLine.GetNextCaretCharacterHit(currentCharacterHit); - - while (nextCharacterHit != currentCharacterHit) - { - currentCharacterHit = nextCharacterHit; - - characterHits.Add(currentCharacterHit); - - nextCharacterHit = textLine.GetNextCaretCharacterHit(currentCharacterHit); - } - } - } - - [Fact] - public void TestPrevious() - { - using (Start()) - { - var defaultProperties = new GenericTextRunProperties(Typeface.Default); - - var text = "Text from memory"; - - var textSource = new SingleBufferTextSource(text, defaultProperties); - - var formatter = new TextFormatterImpl(); - - var textLine = - formatter.FormatLine(textSource, 0, double.PositiveInfinity, - new GenericTextParagraphProperties(defaultProperties)); - - var characterHits = new List(); - - var currentCharacterHit = new CharacterHit(text.Length); - - characterHits.Add(currentCharacterHit); - - var nextCharacterHit = textLine.GetPreviousCaretCharacterHit(currentCharacterHit); - - while (nextCharacterHit != currentCharacterHit) - { - currentCharacterHit = nextCharacterHit; - - characterHits.Add(currentCharacterHit); - - nextCharacterHit = textLine.GetPreviousCaretCharacterHit(currentCharacterHit); - } - } - } - private static IDisposable Start() { var disposable = UnitTestApplication.Start(TestServices.MockPlatformRenderInterface