浏览代码

Fixed System_Rune_ColumnWidth unit test.

BDisp 2 年之前
父节点
当前提交
436c171478
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      UnitTests/TextFormatterTests.cs

+ 2 - 2
UnitTests/TextFormatterTests.cs

@@ -2841,12 +2841,12 @@ namespace Terminal.Gui.Core {
 
 			c = new System.Rune (31);
 			Assert.Equal (-1, Rune.ColumnWidth (c));        // non printable character
-			Assert.Equal (-1, ustring.Make (c).ConsoleWidth);
+			Assert.Equal (0, ustring.Make (c).ConsoleWidth);// ConsoleWidth only returns zero or greater than zero
 			Assert.Equal (1, ustring.Make (c).Length);
 
 			c = new System.Rune (127);
 			Assert.Equal (-1, Rune.ColumnWidth (c));       // non printable character
-			Assert.Equal (-1, ustring.Make (c).ConsoleWidth);
+			Assert.Equal (0, ustring.Make (c).ConsoleWidth);
 			Assert.Equal (1, ustring.Make (c).Length);
 		}