From 53fbdab54d4e3f2d5f7ea5c7fcb44e149a85b692 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 20 Feb 2024 19:52:06 -0700 Subject: [PATCH] Make this easier to follow (naming only) --- UnitTests/TestHelpers.cs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/UnitTests/TestHelpers.cs b/UnitTests/TestHelpers.cs index e9a7a2ad7..8de81cb35 100644 --- a/UnitTests/TestHelpers.cs +++ b/UnitTests/TestHelpers.cs @@ -1,4 +1,4 @@ -using System.Diagnostics; +using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Text; @@ -330,43 +330,44 @@ internal partial class TestHelpers Cell [,] contents = driver.Contents; - for (var r = 0; r < driver.Rows; r++) + + for (var rowIndex = 0; rowIndex < driver.Rows; rowIndex++) { List runes = []; - for (var c = 0; c < driver.Cols; c++) + for (var colIndex = 0; colIndex < driver.Cols; colIndex++) { - Rune rune = contents [r, c].Rune; + Rune runeAtCurrentLocation = contents [rowIndex, colIndex].Rune; if (runeAtCurrentLocation != SpaceRune) { if (x == -1) { - x = c; - y = r; + x = colIndex; + y = rowIndex; - for (var i = 0; i < c; i++) + for (int i = 0; i < colIndex; i++) { runes.InsertRange (i, [SpaceRune]); } } - if (rune.GetColumns () > 1) + if (runeAtCurrentLocation.GetColumns () > 1) { - c++; + colIndex++; } - if (c + 1 > w) + if (colIndex + 1 > w) { - w = c + 1; + w = colIndex + 1; } - h = r - y + 1; + h = rowIndex - y + 1; } if (x > -1) { - runes.Add (rune); + runes.Add (runeAtCurrentLocation); } // See Issue #2616