-
Notifications
You must be signed in to change notification settings - Fork 20
/
bad_generators.yaml
257 lines (256 loc) · 2.88 KB
/
bad_generators.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# This file contains multiple yaml documents. Each of them should fail to parse as a generators.yaml file.
---
# Wrong top level type
abc
---
0
---
true
---
[{data:[]}]
---
# solution must be null or string
solution: 0
---
solution: 0.0
---
solution: []
---
solution: {}
---
solution: true
---
solution: false
---
# visualizer must be null or string
visualizer: 0
---
# random_salt must be null or string
random_salt: 0
---
random_salt: 0.0
---
random_salt: []
---
random_salt: {}
---
random_salt: true
---
random_salt: false
---
# generators must be a dictionary of non-empty list of string
generators: str
---
generators: []
---
generators: [str]
---
generators:
g: a
---
generators:
g: 1
---
generators:
g:
---
generators:
g: []
---
generators:
g:
- true
---
# data: must be a dictionary or list of dictionaries
data: str
---
# Note: We could actually decide to make this work in the future, but for now this is an error.
data:
- str
---
data: 1
---
data: [1]
---
data: {1: 2}
---
data: [{}]
---
data:
- true
---
# Unnumbered keys must not be empty.
data:
'': str
---
data:
- '':
- a
---
data:
a :
- a
---
data:
a : []
---
# generate must not contain {seed} twice.
data:
ab: gen {seed} {seed}
---
data:
ab: gen {seed} {seed:1}
---
data:
ab: gen {seed:1} {seed}
---
data:
ab: gen {seed:1} {seed:1}
---
data:
ab: gen {seed:1} {seed:2}
---
# Unlisted cases should be null, not empty string
data:
ab: ''
---
# Testcase object must be command string or contain generate.
data:
ab: true
---
data:
ab: 1
---
data:
ab: []
---
data:
ab:
generate: true
---
data:
ab:
generate: 1
---
data:
ab:
generate: {}
---
data:
ab:
generate: []
---
# Copied cases must not have an absolute path.
data:
ab: /a/b/c
---
data:
ab: {copy: /a/b/c}
---
data:
ab: /c
---
data:
ab: {copy: /generators/c}
---
# Generator invocations must not have an absolute path.
data:
ab: /gen
---
data:
ab: /generators/gen
---
data:
ab: /generators/dir/gen.py
---
# Solution ans visualizer must have an absolute path:
solution: a
---
solution: a/b
---
solution: a 1 2
---
visualizer: a
---
visualizer: a/b
---
visualizer: a 1 2
---
visualizer: a {name}
---
# Directories may not have generate:.
generate: xyz
---
data:
ab:
generate: x
data:
---
# Testcases may not have data:.
data:
ab:
generate: abc
data: {}
---
# File names must be >= 2 letters
data:
a:
type: directory
---
# Keys are strings
data:
1.: hi
---
data:
true: hi
---
data:
1: hi
'1': hi
---
data:
01: hia
'1': hib
---
data:
01: hi
'1': hi
---
data:
0: x
---
data:
1: x
---
# Arguments are separated by whitespace
data:
1: x y z
2: |
x
y
z
---
# Numbered cases must contain exactly one testcase
data:
-
---
data:
- a:
b:
---
# Numbered testcases must contain a dict
data:
- 1
---
data:
- string
---
data:
- []
---
data:
- {}
---
data: [{}]
---
data: [{}]