Skip to content

Commit 11fa854

Browse files
Merge pull request #255 from SwiftFiddle/fixtures
Sort test data
2 parents 33fcacc + 519439b commit 11fa854

File tree

9 files changed

+3044
-3045
lines changed

9 files changed

+3044
-3045
lines changed

Tests/AppTests/AppTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ final class AppTests: XCTestCase {
273273
)
274274

275275
let decoder = JSONDecoder()
276-
print(response.syntaxJSON)
277276

278277
XCTAssertEqual(
279278
try decoder.decode([TreeNode].self, from: Data(response.syntaxJSON.utf8)),

Tests/AppTests/Fixtures/test-1-1.json

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
}
4242
}
4343
],
44-
"type": "other",
45-
"text": "SourceFile"
44+
"text": "SourceFile",
45+
"type": "other"
4646
},
4747
{
48-
"text": "CodeBlockItemList",
4948
"id": 1,
49+
"parent": 0,
5050
"range": {
5151
"startColumn": 1,
5252
"endRow": 1,
@@ -67,12 +67,12 @@
6767
}
6868
}
6969
],
70-
"type": "collection",
71-
"parent": 0
70+
"text": "CodeBlockItemList",
71+
"type": "collection"
7272
},
7373
{
74-
"text": "CodeBlockItem",
7574
"id": 2,
75+
"parent": 1,
7676
"range": {
7777
"startColumn": 1,
7878
"endRow": 1,
@@ -124,12 +124,12 @@
124124
}
125125
}
126126
],
127-
"type": "other",
128-
"parent": 1
127+
"text": "CodeBlockItem",
128+
"type": "other"
129129
},
130130
{
131-
"text": "VariableDecl",
132131
"id": 3,
132+
"parent": 2,
133133
"range": {
134134
"startColumn": 1,
135135
"endRow": 1,
@@ -194,20 +194,20 @@
194194
}
195195
}
196196
],
197-
"type": "decl",
198-
"parent": 2
197+
"text": "VariableDecl",
198+
"type": "decl"
199199
},
200200
{
201-
"parent": 3,
202201
"id": 4,
202+
"parent": 3,
203203
"range": {
204204
"startColumn": 1,
205205
"endRow": 1,
206206
"endColumn": 4,
207207
"startRow": 1
208208
},
209-
"text": "let",
210209
"structure": [],
210+
"text": "let",
211211
"token": {
212212
"kind": "letKeyword",
213213
"leadingTrivia": "",
@@ -216,8 +216,8 @@
216216
"type": "other"
217217
},
218218
{
219-
"text": "PatternBindingList",
220219
"id": 5,
220+
"parent": 3,
221221
"range": {
222222
"startColumn": 5,
223223
"endRow": 1,
@@ -238,12 +238,12 @@
238238
}
239239
}
240240
],
241-
"type": "collection",
242-
"parent": 3
241+
"text": "PatternBindingList",
242+
"type": "collection"
243243
},
244244
{
245-
"text": "PatternBinding",
246245
"id": 6,
246+
"parent": 5,
247247
"range": {
248248
"startColumn": 5,
249249
"endRow": 1,
@@ -320,12 +320,12 @@
320320
}
321321
}
322322
],
323-
"type": "other",
324-
"parent": 5
323+
"text": "PatternBinding",
324+
"type": "other"
325325
},
326326
{
327-
"text": "IdentifierPattern",
328327
"id": 7,
328+
"parent": 6,
329329
"range": {
330330
"startColumn": 5,
331331
"endRow": 1,
@@ -353,20 +353,20 @@
353353
}
354354
}
355355
],
356-
"type": "pattern",
357-
"parent": 6
356+
"text": "IdentifierPattern",
357+
"type": "pattern"
358358
},
359359
{
360-
"parent": 7,
361360
"id": 8,
361+
"parent": 7,
362362
"range": {
363363
"startColumn": 5,
364364
"endRow": 1,
365365
"endColumn": 11,
366366
"startRow": 1
367367
},
368-
"text": "number",
369368
"structure": [],
369+
"text": "number",
370370
"token": {
371371
"kind": "identifier(\"number\")",
372372
"leadingTrivia": "",
@@ -375,8 +375,8 @@
375375
"type": "other"
376376
},
377377
{
378-
"text": "InitializerClause",
379378
"id": 9,
379+
"parent": 6,
380380
"range": {
381381
"startColumn": 12,
382382
"endRow": 1,
@@ -417,20 +417,20 @@
417417
}
418418
}
419419
],
420-
"type": "other",
421-
"parent": 6
420+
"text": "InitializerClause",
421+
"type": "other"
422422
},
423423
{
424-
"parent": 9,
425424
"id": 10,
425+
"parent": 9,
426426
"range": {
427427
"startColumn": 12,
428428
"endRow": 1,
429429
"endColumn": 13,
430430
"startRow": 1
431431
},
432-
"text": "=",
433432
"structure": [],
433+
"text": "=",
434434
"token": {
435435
"kind": "equal",
436436
"leadingTrivia": "",
@@ -439,8 +439,8 @@
439439
"type": "other"
440440
},
441441
{
442-
"text": "IntegerLiteralExpr",
443442
"id": 11,
443+
"parent": 9,
444444
"range": {
445445
"startColumn": 14,
446446
"endRow": 1,
@@ -468,20 +468,20 @@
468468
}
469469
}
470470
],
471-
"type": "expr",
472-
"parent": 9
471+
"text": "IntegerLiteralExpr",
472+
"type": "expr"
473473
},
474474
{
475-
"parent": 11,
476475
"id": 12,
476+
"parent": 11,
477477
"range": {
478478
"startColumn": 14,
479479
"endRow": 1,
480480
"endColumn": 15,
481481
"startRow": 1
482482
},
483-
"text": "0",
484483
"structure": [],
484+
"text": "0",
485485
"token": {
486486
"kind": "integerLiteral(\"0\")",
487487
"leadingTrivia": "",
@@ -490,16 +490,16 @@
490490
"type": "other"
491491
},
492492
{
493-
"parent": 0,
494493
"id": 13,
494+
"parent": 0,
495495
"range": {
496496
"startColumn": 15,
497497
"endRow": 1,
498498
"endColumn": 15,
499499
"startRow": 1
500500
},
501-
"text": "",
502501
"structure": [],
502+
"text": "",
503503
"token": {
504504
"kind": "eof",
505505
"leadingTrivia": "",

0 commit comments

Comments
 (0)