20250227 finished.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
|
||||
24
LeetCodeSharp.Tests/P2296Tests.cs
Normal file
24
LeetCodeSharp.Tests/P2296Tests.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using LeetCodeSharp.Problems2296;
|
||||
|
||||
namespace LeetCodeSharp.Tests;
|
||||
|
||||
public sealed class P2296Tests
|
||||
{
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
TextEditor editor = new();
|
||||
|
||||
editor.AddText("leetcode");
|
||||
Assert.Equal(4, editor.DeleteText(4));
|
||||
editor.AddText("practice");
|
||||
|
||||
Assert.Equal("etpractice", editor.CursorRight(3));
|
||||
Assert.Equal("leet", editor.CursorLeft(8));
|
||||
|
||||
Assert.Equal(4, editor.DeleteText(4));
|
||||
Assert.Equal(string.Empty, editor.CursorLeft(2));
|
||||
|
||||
Assert.Equal("practi", editor.CursorRight(6));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user