1
0

Fix last line

This commit is contained in:
Serghei Cebotari 2023-08-09 15:10:40 +03:00
parent c9ca856d8f
commit b11227be2d
2 changed files with 3 additions and 4 deletions

View File

@ -33,7 +33,7 @@ namespace Codeforces
{ {
if (stdOut == null) if (stdOut == null)
{ {
return ""; return string.Empty;
} }
else else
{ {
@ -43,7 +43,7 @@ namespace Codeforces
public static string[] GetOutputLines() public static string[] GetOutputLines()
{ {
return GetOutput().Split(Environment.NewLine); return GetOutput().Split(Environment.NewLine).SkipLast(1).ToArray();
} }
public static IList<string> GetOutputLinesAsList() public static IList<string> GetOutputLinesAsList()

View File

@ -30,11 +30,10 @@ public class Tests
}; };
string[] actualOutput = IOTester.GetOutputLines(); string[] actualOutput = IOTester.GetOutputLines();
Assert.Equal(output.Length, actualOutput.Length - 1); Assert.Equal(output.Length, actualOutput.Length);
for (int i = 0; i< output.Length; i++) for (int i = 0; i< output.Length; i++)
{ {
Assert.Equal(output[i], actualOutput[i]); Assert.Equal(output[i], actualOutput[i]);
} }
} }
} }