Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robertcoltheart committed Dec 20, 2024
1 parent e25683f commit 3459b0d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,17 @@ public static string EachToUsefulString<T>(this IEnumerable<T> enumerable)

var sb = new StringBuilder();
sb.AppendLine("{");
sb.Append(string.Join(",\r\n", array.Select(x => x.ToUsefulString().Tab()).Take(10).ToArray()));
sb.Append(string.Join($",{Environment.NewLine}", array.Select(x => x.ToUsefulString().Tab()).Take(10).ToArray()));

if (array.Length > 10)
{
if (array.Length > 11)
{
sb.AppendLine($",\r\n ...({array.Length - 10} more elements)");
sb.AppendLine($",{Environment.NewLine} ...({array.Length - 10} more elements)");
}
else
{
sb.AppendLine(",\r\n" + array.Last().ToUsefulString().Tab());
sb.AppendLine($",{Environment.NewLine}" + array.Last().ToUsefulString().Tab());
}
}
else
Expand Down Expand Up @@ -214,7 +214,7 @@ internal static string ToUsefulString(this object obj)
{
var enumerable = items.Cast<object>();

return items.GetType() + ":\r\n" + enumerable.EachToUsefulString();
return items.GetType() + $":{Environment.NewLine}" + enumerable.EachToUsefulString();
}

var str = obj.ToString();
Expand Down

0 comments on commit 3459b0d

Please sign in to comment.