Skip to content

Commit 80cab04

Browse files
committed
Move example files to examples directory, add from NWERC 2008.
1 parent 096c0cd commit 80cab04

File tree

13 files changed

+75
-3
lines changed

13 files changed

+75
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ Checktestdata is a tool to verify the syntactical integrity of test cases in
88
programming contests like the ACM ICPC.
99

1010
It allows you to specify a simple grammar for your testdata input files,
11-
according to which the testdata is checked. Two sample scripts
12-
`hello.ctd` and `fltcmp.ctd` are provided for
13-
[DOMjudge](https://www.domjudge.org/) sample problems *hello* and *fltcmp*.
11+
according to which the testdata is checked. In [the examples directory](examples)
12+
you find two sample scripts `hello.ctd` and `fltcmp.ctd` from the
13+
[DOMjudge](https://www.domjudge.org/) sample problems *hello* and
14+
*fltcmp*, and under [examples/nwerc2008](examples/nwerc2008) the
15+
scripts used for the [NWERC 2008 problemset](http://2008.nwerc.eu/contest/problemset).
1416

1517
## Grammar specification
1618

File renamed without changes.
File renamed without changes.

examples/nwerc2008/catdog.ctd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
INT(1,100,runs) NEWLINE
2+
REP(runs)
3+
INT(1,100,c) SPACE INT(1,100,d) SPACE INT(0,500,v) NEWLINE
4+
REP(v)
5+
REGEX("(C|D)",keep) INT(1,100) SPACE
6+
REGEX("(C|D)",lose) INT(1,100) NEWLINE
7+
ASSERT( keep != lose )
8+
END
9+
END

examples/nwerc2008/easyclimb.ctd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
INT(1,100,runs) NEWLINE
2+
REP(runs)
3+
INT(2,100,n) SPACE INT(0,1000000000) NEWLINE
4+
REP(n,SPACE) INT(0,1000000000) END NEWLINE
5+
END

examples/nwerc2008/equivalences.ctd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
INT(1,100,runs) NEWLINE
2+
REP(runs)
3+
INT(1,20000,n) SPACE INT(0,50000,m) NEWLINE
4+
REP(m)
5+
INT(1,n,a) SPACE INT(1,n,b) ASSERT(a!=b) NEWLINE
6+
END
7+
END

examples/nwerc2008/judge.ctd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
INT(1,100,runs) NEWLINE
2+
REP(runs)
3+
INT(0,10000) NEWLINE
4+
END

examples/nwerc2008/matches.ctd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
INT(1,100,runs) NEWLINE
2+
REP(runs)
3+
INT(2,100) NEWLINE
4+
END

examples/nwerc2008/mobile.ctd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
INT(1,100,runs) NEWLINE
2+
REP(runs)
3+
REGEX("[][,0-9]+") NEWLINE
4+
END

examples/nwerc2008/rafting.ctd

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
INT(1,100,runs) NEWLINE
2+
REP(runs)
3+
INT(3,100,ni) NEWLINE
4+
REP(ni)
5+
INT(-1000,1000) SPACE INT(-1000,1000) NEWLINE
6+
END
7+
INT(3,100,no) NEWLINE
8+
REP(no)
9+
INT(-1000,1000) SPACE INT(-1000,1000) NEWLINE
10+
END
11+
END

0 commit comments

Comments
 (0)