예제 #1
0
        public void DeleteTextEnd()
        {
            // Arrange
            var buf = new Utf32Buffer();

            // Act
            buf.Add("abxx🌐xxcd");
            buf.Delete(4, 5);

            // Assert
            Assert.Equal("abxx", buf.ToString());
        }
예제 #2
0
        public void InsertText()
        {
            // Arrange
            var buf  = new Utf32Buffer();
            var strA = "abcd";
            var strB = "xx🌐xx";

            // Act
            buf.Add(strA);
            buf.Insert(2, strB);

            // Assert
            Assert.Equal("abxx🌐xxcd", buf.ToString());
        }
예제 #3
0
        public void AddText()
        {
            // Arrange
            var buf = new Utf32Buffer();
            var str = "ab🌐cde";

            // Act
            buf.Add(str);

            // Assert
            Assert.Equal(7, str.Length);
            Assert.Equal(6, buf.Length);
            Assert.Equal(str, buf.ToString());
        }