mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
3897 lines
193 KiB
JSON
3897 lines
193 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-switch-statement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
49,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
49,
|
|
49
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"switch-statement.js",
|
|
"switch-statement.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"5481c49f3a51ee55e0aaa093cd2b16ef18852968"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"switch-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/switch-statement.js b/switch-statement.js",
|
|
"index e69de29..5481c49 100644",
|
|
"--- a/switch-statement.js",
|
|
"+++ b/switch-statement.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+switch (1) { case 1: 1; case 2: 1; case 3: 3; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "954df1246c20f230e519c9fb74e256a93cd3e92a..102a1103adca089b9176c54ed7fa1cf8acb4c77f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-switch-statement-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
57,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
67,
|
|
68
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
70,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
62,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
78,
|
|
79
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
81,
|
|
82
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
81,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
89,
|
|
90
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
49,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
49,
|
|
98
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
106,
|
|
107
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
116,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
119,
|
|
120
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
119,
|
|
121
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
111,
|
|
121
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
127,
|
|
128
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
130,
|
|
131
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
122,
|
|
132
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
138,
|
|
139
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
141,
|
|
142
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
141,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
133,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
145
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
98,
|
|
147
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
49,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
49,
|
|
49
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
147,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
147,
|
|
147
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"switch-statement.js",
|
|
"switch-statement.js"
|
|
],
|
|
"oids": [
|
|
"5481c49f3a51ee55e0aaa093cd2b16ef18852968",
|
|
"ffd4a32a83d8f1c5daffc82baaa1b3ae3e17615d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"switch-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/switch-statement.js b/switch-statement.js",
|
|
"index 5481c49..ffd4a32 100644",
|
|
"--- a/switch-statement.js",
|
|
"+++ b/switch-statement.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+switch (2) { case 1: 1; case 2: 2; case 3: 3; };",
|
|
"+switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
|
|
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "102a1103adca089b9176c54ed7fa1cf8acb4c77f..6f1d2c228e9cbc259fdfd2026ce0e3960c3bf976"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-switch-statement-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
57,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
67,
|
|
68
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
70,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
62,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
78,
|
|
79
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
81,
|
|
82
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
81,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
89,
|
|
90
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
49,
|
|
98
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
57,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
67,
|
|
68
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
70,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
62,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
78,
|
|
79
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
81,
|
|
82
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
81,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
89,
|
|
90
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
49,
|
|
98
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
106,
|
|
107
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
116,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
119,
|
|
120
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
119,
|
|
121
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
111,
|
|
121
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
127,
|
|
128
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
130,
|
|
131
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
122,
|
|
132
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
138,
|
|
139
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
141,
|
|
142
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
141,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
133,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
145
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
98,
|
|
147
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
106,
|
|
107
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
116,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
119,
|
|
120
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
119,
|
|
121
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
111,
|
|
121
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
127,
|
|
128
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
130,
|
|
131
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
122,
|
|
132
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
138,
|
|
139
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
141,
|
|
142
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
141,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
133,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
145
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
98,
|
|
147
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
147,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
147,
|
|
147
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
147,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
147,
|
|
147
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"switch-statement.js",
|
|
"switch-statement.js"
|
|
],
|
|
"oids": [
|
|
"ffd4a32a83d8f1c5daffc82baaa1b3ae3e17615d",
|
|
"302fb8bcb5f912b2536298b86f6ef79598e61161"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"switch-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/switch-statement.js b/switch-statement.js",
|
|
"index ffd4a32..302fb8b 100644",
|
|
"--- a/switch-statement.js",
|
|
"+++ b/switch-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-switch (2) { case 1: 1; case 2: 2; case 3: 3; };",
|
|
"+switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
|
|
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
|
|
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "6f1d2c228e9cbc259fdfd2026ce0e3960c3bf976..0b3287553c97194548459416885e547386f2197d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-switch-statement-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
57,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
67,
|
|
68
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
70,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
62,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
78,
|
|
79
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
81,
|
|
82
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
81,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
89,
|
|
90
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
49,
|
|
98
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
57,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
67,
|
|
68
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
70,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
62,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
78,
|
|
79
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
81,
|
|
82
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
81,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
89,
|
|
90
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
49,
|
|
98
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
106,
|
|
107
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
116,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
119,
|
|
120
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
119,
|
|
121
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
111,
|
|
121
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
127,
|
|
128
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
130,
|
|
131
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
122,
|
|
132
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
138,
|
|
139
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
141,
|
|
142
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
141,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
133,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
145
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
98,
|
|
147
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
106,
|
|
107
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
116,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
119,
|
|
120
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
119,
|
|
121
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
111,
|
|
121
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
127,
|
|
128
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
130,
|
|
131
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
122,
|
|
132
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
138,
|
|
139
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
141,
|
|
142
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
141,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
133,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
145
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
98,
|
|
147
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
147,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
147,
|
|
147
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
147,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
147,
|
|
147
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"switch-statement.js",
|
|
"switch-statement.js"
|
|
],
|
|
"oids": [
|
|
"302fb8bcb5f912b2536298b86f6ef79598e61161",
|
|
"ffd4a32a83d8f1c5daffc82baaa1b3ae3e17615d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"switch-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/switch-statement.js b/switch-statement.js",
|
|
"index 302fb8b..ffd4a32 100644",
|
|
"--- a/switch-statement.js",
|
|
"+++ b/switch-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
|
|
"+switch (2) { case 1: 1; case 2: 2; case 3: 3; };",
|
|
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
|
|
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "0b3287553c97194548459416885e547386f2197d..7a73e15cd2ea90a073cc3690e23fe6c0aa6849b2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-switch-statement-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
57,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
67,
|
|
68
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
70,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
62,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
78,
|
|
79
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
81,
|
|
82
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
81,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
89,
|
|
90
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
49,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
49,
|
|
98
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
106,
|
|
107
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
116,
|
|
117
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
119,
|
|
120
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
119,
|
|
121
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
111,
|
|
121
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
127,
|
|
128
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
130,
|
|
131
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
130,
|
|
132
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
122,
|
|
132
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
138,
|
|
139
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
141,
|
|
142
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
141,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
133,
|
|
143
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
145
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
98,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
98,
|
|
147
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
57,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
67,
|
|
68
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
70,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
62,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
78,
|
|
79
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
81,
|
|
82
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
81,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
89,
|
|
90
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
49,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
49,
|
|
98
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
147,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
147,
|
|
147
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
98,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
98,
|
|
98
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"switch-statement.js",
|
|
"switch-statement.js"
|
|
],
|
|
"oids": [
|
|
"ffd4a32a83d8f1c5daffc82baaa1b3ae3e17615d",
|
|
"9b60579183ebc74a2e009db29c44eb08ca46f1c1"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"switch-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/switch-statement.js b/switch-statement.js",
|
|
"index ffd4a32..9b60579 100644",
|
|
"--- a/switch-statement.js",
|
|
"+++ b/switch-statement.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-switch (2) { case 1: 1; case 2: 2; case 3: 3; };",
|
|
"-switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
|
|
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
|
|
"+switch (2) { case 1: 1; case 2: 2; case 3: 3; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7a73e15cd2ea90a073cc3690e23fe6c0aa6849b2..d076963c4618fdd6dc59aba52ee0d4d9f0273bbd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-switch-statement-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
57,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
67,
|
|
68
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
70,
|
|
71
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
72
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
62,
|
|
72
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
78,
|
|
79
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
81,
|
|
82
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
81,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
73,
|
|
83
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
89,
|
|
90
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
92,
|
|
93
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
92,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
84,
|
|
94
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
96
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
49,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
49,
|
|
98
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
98,
|
|
98
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
98,
|
|
98
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
49,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
49,
|
|
49
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"switch-statement.js",
|
|
"switch-statement.js"
|
|
],
|
|
"oids": [
|
|
"9b60579183ebc74a2e009db29c44eb08ca46f1c1",
|
|
"374091f23100462dd830bbcee156f70da22c58be"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"switch-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/switch-statement.js b/switch-statement.js",
|
|
"index 9b60579..374091f 100644",
|
|
"--- a/switch-statement.js",
|
|
"+++ b/switch-statement.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
|
|
" switch (2) { case 1: 1; case 2: 2; case 3: 3; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d076963c4618fdd6dc59aba52ee0d4d9f0273bbd..3b8a2a002e5cf23fa242fab45be41d23d0269feb"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-switch-statement-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Switch",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
8,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
29,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
},
|
|
{
|
|
"category": "Case",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
40,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
43,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
43,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
35,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
49
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
49,
|
|
49
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
49,
|
|
49
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"switch-statement.js",
|
|
"switch-statement.js"
|
|
],
|
|
"oids": [
|
|
"374091f23100462dd830bbcee156f70da22c58be",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"switch-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/switch-statement.js b/switch-statement.js",
|
|
"index 374091f..e69de29 100644",
|
|
"--- a/switch-statement.js",
|
|
"+++ b/switch-statement.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-switch (2) { case 1: 1; case 2: 2; case 3: 3; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "3b8a2a002e5cf23fa242fab45be41d23d0269feb..5feeb9240c4cfaac7dec387bafe580d79ff959c8"
|
|
}]
|