You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/2023-07-draft.md
+15-16Lines changed: 15 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -540,7 +540,8 @@ The `secret` directory must exist, and contain either some test cases, or some [
540
540
541
541
All files and directories associated with a single test case have the same base name with varying extensions.
542
542
Here, base name is defined to be the relative path from the `data` directory to the test case input file, without extensions.
543
-
For example, the files `secret/test.in` and `secret/test.ans` are associated with the same test case that has the base name `secret/test`.
543
+
This is the name of the test case.
544
+
For example, the files `secret/test.in` and `secret/test.ans` are associated with the same test case that has the name `secret/test`.
544
545
The existence of the `.in` file declares the existence of the test case.
545
546
If the test case exists, then an associated `.ans` file must exist while the others are optional.
546
547
If the test case does not exist, then the other files must not exist.
@@ -561,7 +562,7 @@ as well as the `args` sequence in the `.yaml` file, then the input of the two te
561
562
This means that for any two test cases, if their input, output validator arguments and the contents of their `.ans` files are equivalent, then the test cases are equivalent.
562
563
The assumption of determinism means that a judge system could choose to reuse the result of a previous run, or to re-run the equivalent test case.
563
564
564
-
Test cases and [test data groups](#test-data-groups) will be used in lexicographical order on base name.
565
+
Test cases and [test data groups](#test-data-groups) will be used in lexicographical order on test case or test group name.
565
566
It is good practice to use a numbered prefix such as `00`, `01`, `02`, `03`, and so on, to get the desired order of test cases, while keeping the file names descriptive.
566
567
Remember that the numbered prefixes should be zero padded to the same length to get the expected lexicographical order.
567
568
@@ -591,6 +592,8 @@ The secret data may be subdivided into test data groups.
591
592
Every subdirectory of `data/secret/` is a test data group and may contain a `test_group.yaml` configuration file.
592
593
`data/secret` can only have test data groups *or* test cases, never both.
593
594
That is, if there are any directories under `data/secret/` there must not be any `.in` files directly in `data/secret/` and vice versa.
595
+
The name of a test data group is the path under `data/`.
596
+
For example, the test data group defined by the directory `data/secret/group1` has the name `secret/group1`.
594
597
595
598
The test data groups themselves can contain directories, but not further groups.
596
599
This means that there are no `test_group.yaml` further down in the directory hierarchy.
@@ -601,7 +604,7 @@ Each test data group must contain at least one test case, or a static validation
601
604
602
605
Each test case can supply input via standard input, command-line arguments, and/or the file system.
603
606
These options are not exclusive.
604
-
For a test case with base name `test`, the file `test.in` is piped to the submission as standard input.
607
+
For a test case with name `test`, the file `test.in` is piped to the submission as standard input.
605
608
The submission will be run with the `args` sequence defined in the `test.yaml` file as command-line arguments.
606
609
Note that usually the submission's entry point, whether it be a binary or an interpreted file, will be the absolute first command line argument.
607
610
However, there exist languages, such as Java, where there is no initial command line argument representing the entry point.
@@ -613,7 +616,6 @@ possibly overwriting the compiled submission file or included data in the case o
613
616
### Test Case Configuration
614
617
615
618
One YAML file with additional configuration may be provided per test case.
616
-
The file must share the base name of the associated test case.
617
619
618
620
The allowed keys are defined as follows.
619
621
Keys are optional unless explicitly stated.
@@ -653,7 +655,6 @@ For each test case:
653
655
654
656
An illustration provides a visualization of the associated test case, meant for the judges.
655
657
At most one illustration file may be provided per test case.
656
-
The file must share the base name of the associated test case.
657
658
The supported file extensions are `.png`, `.jpg`, `jpeg`, and `.svg`.
658
659
659
660
### Invalid Test Cases
@@ -1358,15 +1359,13 @@ The submission score is the score of `secret`.
1358
1359
1359
1360
It is a judge error if the score of `secret` or any test data group exceeds its `max_score`.
1360
1361
1361
-
#### Required Dependent Groups
1362
+
#### Group Dependencies
1362
1363
1363
-
A test data group or `secret` may specify that it depends on some other test data groups or `sample`.
1364
-
Each required group must have `pass-fail` aggregation.
1365
-
The dependent group will only be run if the group being depended on receives an accepted verdict for all test cases in the group.
1366
-
If the dependent group is not run, the group score is 0.
1367
-
1368
-
The paths of these required groups, relative to the `data` folder, are listed under the `require_pass` key.
1369
-
A path consists of zero or more directory names followed by a directory or file name, with a `/` character separating consecutive names. Each name must conform to the [general requirements](#general-requirements) on directory and file names and the specified test data group must exist.
1370
-
1371
-
A group must not depend on a group that is lexicographically earlier than itself.
1372
-
A group must not depend on a group that is hierarchally above itself.
1364
+
A test data group, or `secret` may specify that it depends on some other test data groups.
1365
+
Note that `secret` may only depend on `sample`.
1366
+
Also, note that `sample` cannot depend on any group.
1367
+
Each group mentioned under `require_pass` must have `pass-fail` aggregation.
1368
+
The group specifying `require_pass` will only be run if the group being referred to receives an accepted verdict for all test cases in the group.
1369
+
If the group is not run, the group score is 0, and all test cases in the group are treated as having received a verdict that is not accepted.
1370
+
The `require_pass` is set to the name of a single test data group, or `sample`, or a sequence of such names.
1371
+
All groups listed in `require_pass` must come lexicographically earlier than the group it is specified for.
0 commit comments