diff options
author | Serghei Cebotari <serghei@cebotari.ru> | 2023-08-09 09:42:50 +0300 |
---|---|---|
committer | Serghei Cebotari <serghei@cebotari.ru> | 2023-08-09 09:42:50 +0300 |
commit | c9ca856d8f76d3b4c86532defa04d47c0d0a17f2 (patch) | |
tree | f71839a0721050f89e120695faefcd203ab0fd2e /Codeforces.Test | |
parent | d6adac69ab2ebcbb4b0b234005b4f928319e5cb3 (diff) |
Simple task
Diffstat (limited to 'Codeforces.Test')
-rw-r--r-- | Codeforces.Test/Tests.cs | 40 | ||||
-rw-r--r-- | Codeforces.Test/UnitTest1.cs | 10 | ||||
-rw-r--r-- | Codeforces.Test/Usings.cs | 3 |
3 files changed, 42 insertions, 11 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 diff --git a/Codeforces.Test/UnitTest1.cs b/Codeforces.Test/UnitTest1.cs deleted file mode 100644 index 8f7b9b7..0000000 --- a/Codeforces.Test/UnitTest1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Codeforces.Test; - -public class UnitTest1 -{ - [Fact] - public void Test1() - { - - } -}
\ No newline at end of file diff --git a/Codeforces.Test/Usings.cs b/Codeforces.Test/Usings.cs index 8c927eb..c1ede49 100644 --- a/Codeforces.Test/Usings.cs +++ b/Codeforces.Test/Usings.cs @@ -1 +1,2 @@ -global using Xunit;
\ No newline at end of file +global using Xunit; +global using Codeforces;
\ No newline at end of file |