diff options
Diffstat (limited to 'Codeforces.Test/Tests.cs')
-rw-r--r-- | Codeforces.Test/Tests.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Codeforces.Test/Tests.cs b/Codeforces.Test/Tests.cs new file mode 100644 index 0000000..db4dace --- /dev/null +++ b/Codeforces.Test/Tests.cs @@ -0,0 +1,40 @@ +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(); + Assert.Equal(output.Length, actualOutput.Length - 1); + for (int i = 0; i< output.Length; i++) + { + Assert.Equal(output[i], actualOutput[i]); + } + } + +}
\ No newline at end of file |