2023-08-09 09:42:50 +03:00
|
|
|
namespace Codeforces.Test;
|
|
|
|
|
|
|
|
public class Tests
|
|
|
|
{
|
|
|
|
[Fact]
|
|
|
|
public void TestIO()
|
|
|
|
{
|
|
|
|
IOTester.Start();
|
|
|
|
|
|
|
|
string[] input = new string[]
|
|
|
|
{
|
|
|
|
"5",
|
|
|
|
"256 42",
|
|
|
|
"1000 1000",
|
|
|
|
"-1000 1000",
|
|
|
|
"-1000 1000",
|
|
|
|
"20 22"
|
|
|
|
};
|
|
|
|
IOTester.SetInput(input);
|
|
|
|
|
|
|
|
Program.Main(new string[0]);
|
|
|
|
|
|
|
|
string[] output = new string[]
|
|
|
|
{
|
|
|
|
"298",
|
|
|
|
"2000",
|
|
|
|
"0",
|
|
|
|
"0",
|
|
|
|
"42"
|
|
|
|
};
|
|
|
|
|
|
|
|
string[] actualOutput = IOTester.GetOutputLines();
|
2023-08-09 15:10:40 +03:00
|
|
|
Assert.Equal(output.Length, actualOutput.Length);
|
2023-08-09 09:42:50 +03:00
|
|
|
for (int i = 0; i< output.Length; i++)
|
|
|
|
{
|
|
|
|
Assert.Equal(output[i], actualOutput[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|