Skip to content

Test Cases

Marcelo Fornet edited this page May 23, 2020 · 3 revisions

Each problem contains a set of test cases stored under the folder testcases. Each test case is composed by the following files

  • {name}.in Input file.
  • {name}.ans Expected output.
  • {name}.out Generated output from main solution.

Files .out are generated after executing main solution against that test case. These three files are passed to the checker to verify its correctness.

Create test cases

If used competitive companion all parsed test cases will be created by default with consecutive numbers: 0.in/0.ans, 1.in/1.ans, etc...

To add more test cases by hand, open the command palette and call ACMX: Add Test Case. It will create two new files in testcases folder called 0.hand.in and 0.hand.ans that should be populated by hand. The view will change to edit both files. After edit call ACMX: View: Code (Ctrl + Shift + L) to see main solution again.

To remove a test case, simply delete such files from the testcases folder.

Open test case

To edit some of the existing test case use the command ACMX: Open Test Case. It will show a quick pick with all available test cases. After selecting one, two editor will show both {name}.in and {name}.ans for edition. After edit call ACMX: View: Code (Ctrl + Shift + L) to see main solution again.