1 #ifndef SPECTESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 #define SPECTESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3 
4 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
5 #pragma once
6 #endif
7 
8 #include <string>
9 
10 namespace Test {
11 	struct TEST {
TESTTEST12 		TEST(): ok(false) {}
TESTTEST13 		TEST(bool ok_): ok(ok_) {}
TESTTEST14 		TEST(const char *error_): ok(false), error(error_) {}
15 
16 		bool ok;
17 		std::string error;
18 	};
19 
20 	namespace Spec {
21 		// 2.1
22 		TEST SeqScalars();
23 
24 		// 2.2
25 		TEST MappingScalarsToScalars();
26 
27 		// 2.3
28 		TEST MappingScalarsToSequences();
29 
30 		// 2.4
31 		TEST SequenceOfMappings();
32 
33 		// 2.5
34 		TEST SequenceOfSequences();
35 
36 		// 2.6
37 		TEST MappingOfMappings();
38 
39 		// 2.7
40 		TEST TwoDocumentsInAStream();
41 
42 		// 2.8
43 		TEST PlayByPlayFeed();
44 
45 		// 2.9
46 		TEST SingleDocumentWithTwoComments();
47 
48 		// 2.10
49 		TEST SimpleAnchor();
50 
51 		// 2.11
52 		TEST MappingBetweenSequences();
53 
54 		// 2.12
55 		TEST CompactNestedMapping();
56 
57 		// 2.13
58 		TEST InLiteralsNewlinesArePreserved();
59 
60 		// 2.14
61 		TEST InFoldedScalarsNewlinesBecomeSpaces();
62 
63 		// 2.15
64 		TEST FoldedNewlinesArePreservedForMoreIndentedAndBlankLines();
65 
66 		// 2.16
67 		TEST IndentationDeterminesScope();
68 
69 		// 2.17
70 		TEST QuotedScalars();
71 
72 		// 2.18
73 		TEST MultiLineFlowScalars();
74 
75 		// TODO: 2.19 - 2.22 schema tags
76 
77 		// 2.23
78 		TEST VariousExplicitTags();
79 
80 		// 2.24
81 		TEST GlobalTags();
82 
83 		// 2.25
84 		TEST UnorderedSets();
85 
86 		// 2.26
87 		TEST OrderedMappings();
88 
89 		// 2.27
90 		TEST Invoice();
91 
92 		// 2.28
93 		TEST LogFile();
94 
95 		// TODO: 5.1 - 5.2 BOM
96 
97 		// 5.3
98 		TEST BlockStructureIndicators();
99 
100 		// 5.4
101 		TEST FlowStructureIndicators();
102 
103 		// 5.5
104 		TEST CommentIndicator();
105 
106 		// 5.6
107 		TEST NodePropertyIndicators();
108 
109 		// 5.7
110 		TEST BlockScalarIndicators();
111 
112 		// 5.8
113 		TEST QuotedScalarIndicators();
114 
115 		// TODO: 5.9 directive
116 		// TODO: 5.10 reserved indicator
117 
118 		// 5.11
119 		TEST LineBreakCharacters();
120 
121 		// 5.12
122 		TEST TabsAndSpaces();
123 
124 		// 5.13
125 		TEST EscapedCharacters();
126 
127 		// 5.14
128 		TEST InvalidEscapedCharacters();
129 
130 		// 6.1
131 		TEST IndentationSpaces();
132 
133 		// 6.2
134 		TEST IndentationIndicators();
135 
136 		// 6.3
137 		TEST SeparationSpaces();
138 
139 		// 6.4
140 		TEST LinePrefixes();
141 
142 		// 6.5
143 		TEST EmptyLines();
144 
145 		// 6.6
146 		TEST LineFolding();
147 
148 		// 6.7
149 		TEST BlockFolding();
150 
151 		// 6.8
152 		TEST FlowFolding();
153 
154 		// 6.9
155 		TEST SeparatedComment();
156 
157 		// 6.10
158 		TEST CommentLines();
159 
160 		// 6.11
161 		TEST MultiLineComments();
162 
163 		// 6.12
164 		TEST SeparationSpacesII();
165 
166 		// 6.13
167 		TEST ReservedDirectives();
168 
169 		// 6.14
170 		TEST YAMLDirective();
171 
172 		// 6.15
173 		TEST InvalidRepeatedYAMLDirective();
174 
175 		// 6.16
176 		TEST TagDirective();
177 
178 		// 6.17
179 		TEST InvalidRepeatedTagDirective();
180 
181 		// 6.18
182 		TEST PrimaryTagHandle();
183 
184 		// 6.19
185 		TEST SecondaryTagHandle();
186 
187 		// 6.20
188 		TEST TagHandles();
189 
190 		// 6.21
191 		TEST LocalTagPrefix();
192 
193 		// 6.22
194 		TEST GlobalTagPrefix();
195 
196 		// 6.23
197 		TEST NodeProperties();
198 
199 		// 6.24
200 		TEST VerbatimTags();
201 
202 		// 6.25
203 		TEST InvalidVerbatimTags();
204 
205 		// 6.26
206 		TEST TagShorthands();
207 
208 		// 6.27
209 		TEST InvalidTagShorthands();
210 
211 		// 6.28
212 		TEST NonSpecificTags();
213 
214 		// 6.29
215 		TEST NodeAnchors();
216 
217 		// 7.1
218 		TEST AliasNodes();
219 
220 		// 7.2
221 		TEST EmptyNodes();
222 
223 		// 7.3
224 		TEST CompletelyEmptyNodes();
225 
226 		// 7.4
227 		TEST DoubleQuotedImplicitKeys();
228 
229 		// 7.5
230 		TEST DoubleQuotedLineBreaks();
231 
232 		// 7.6
233 		TEST DoubleQuotedLines();
234 
235 		// 7.7
236 		TEST SingleQuotedCharacters();
237 
238 		// 7.8
239 		TEST SingleQuotedImplicitKeys();
240 
241 		// 7.9
242 		TEST SingleQuotedLines();
243 
244 		// 7.10
245 		TEST PlainCharacters();
246 
247 		// 7.11
248 		TEST PlainImplicitKeys();
249 
250 		// 7.12
251 		TEST PlainLines();
252 
253 		// 7.13
254 		TEST FlowSequence();
255 
256 		// 7.14
257 		TEST FlowSequenceEntries();
258 
259 		// 7.15
260 		TEST FlowMappings();
261 
262 		// 7.16
263 		TEST FlowMappingEntries();
264 
265 		// 7.17
266 		TEST FlowMappingSeparateValues();
267 
268 		// 7.18
269 		TEST FlowMappingAdjacentValues();
270 
271 		// 7.19
272 		TEST SinglePairFlowMappings();
273 
274 		// 7.20
275 		TEST SinglePairExplicitEntry();
276 
277 		// 7.21
278 		TEST SinglePairImplicitEntries();
279 
280 		// 7.22
281 		TEST InvalidImplicitKeys();
282 
283 		// 7.23
284 		TEST FlowContent();
285 
286 		// 7.24
287 		TEST FlowNodes();
288 
289 		// 8.1
290 		TEST BlockScalarHeader();
291 
292 		// 8.2
293 		TEST BlockIndentationHeader();
294 
295 		// 8.3
296 		TEST InvalidBlockScalarIndentationIndicators();
297 
298 		// 8.4
299 		TEST ChompingFinalLineBreak();
300 
301 		// 8.5
302 		TEST ChompingTrailingLines();
303 
304 		// 8.6
305 		TEST EmptyScalarChomping();
306 
307 		// 8.7
308 		TEST LiteralScalar();
309 
310 		// 8.8
311 		TEST LiteralContent();
312 
313 		// 8.9
314 		TEST FoldedScalar();
315 
316 		// 8.10
317 		TEST FoldedLines();
318 
319 		// 8.11
320 		TEST MoreIndentedLines();
321 
322 		// 8.12
323 		TEST EmptySeparationLines();
324 
325 		// 8.13
326 		TEST FinalEmptyLines();
327 
328 		// 8.14
329 		TEST BlockSequence();
330 
331 		// 8.15
332 		TEST BlockSequenceEntryTypes();
333 
334 		// 8.16
335 		TEST BlockMappings();
336 
337 		// 8.17
338 		TEST ExplicitBlockMappingEntries();
339 
340 		// 8.18
341 		TEST ImplicitBlockMappingEntries();
342 
343 		// 8.19
344 		TEST CompactBlockMappings();
345 
346 		// 8.20
347 		TEST BlockNodeTypes();
348 
349 		// 8.21
350 		TEST BlockScalarNodes();
351 
352 		// 8.22
353 		TEST BlockCollectionNodes();
354 	}
355 
356 	bool RunSpecTests();
357 }
358 
359 #endif // SPECTESTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
360 
361