Skip to content

Commit 4e768bc

Browse files
authored
Updated DiamondTests.cs
`Rows` method adjusted to use system dependent new line characters.
1 parent b337aa8 commit 4e768bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/practice/diamond/DiamondTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
public class DiamondTests
88
{
99
public static readonly char[] AllLetters = GetLetterRange('A', 'Z');
10-
private static string[] Rows(string x) => x.Split(new[] { '\n' }, StringSplitOptions.None);
10+
private static string[] Rows(string x) => x.Split(Environment.NewLine);
1111

1212
private static string LeadingSpaces(string x) => x.Substring(0, x.IndexOfAny(AllLetters));
1313
private static string TrailingSpaces(string x) => x.Substring(x.LastIndexOfAny(AllLetters) + 1);
@@ -125,4 +125,4 @@ public static Arbitrary<char> Chars()
125125
{
126126
return Arb.Default.Char().Filter(x => x >= 'A' && x <= 'Z');
127127
}
128-
}
128+
}

0 commit comments

Comments
 (0)