1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00
semantic/test/corpus/json/javascript/generator-function.json
2016-11-03 15:41:59 -07:00

2827 lines
138 KiB
JSON

[{
"testCaseDescription": "javascript-generator-function-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
10,
23
]
},
{
"category": "Identifier",
"range": [
24,
28
]
},
{
"category": "Identifier",
"range": [
30,
34
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
38,
44
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
51,
55
]
}
],
"range": [
45,
56
]
}
],
"range": [
36,
58
]
}
],
"range": [
0,
58
]
}
],
"range": [
0,
59
]
}
],
"patch": "insert",
"range": [
0,
60
]
}
],
"hasChanges": true,
"range": [
0,
60
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
60,
60
]
}
],
"hasChanges": true,
"range": [
60,
60
],
"number": 2
}
]
],
"paths": [
"generator-function.js",
"generator-function.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"04e8a59bc45444cc298c2142de90af10b8386bf3"
]
},
"filePaths": [
"generator-function.js"
],
"patch": [
"diff --git a/generator-function.js b/generator-function.js",
"index e69de29..04e8a59 100644",
"--- a/generator-function.js",
"+++ b/generator-function.js",
"@@ -0,0 +1 @@",
"+function *generateStuff(arg1, arg2) { yield; yield arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "a52e2d614f9e9504970732cbc2d5f9c933eb061f..a4a896cba2216edee62cc9fe96efdbc5408fdb46"
}
,{
"testCaseDescription": "javascript-generator-function-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
10,
26
]
},
{
"category": "Identifier",
"range": [
27,
31
]
},
{
"category": "Identifier",
"range": [
33,
37
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
41,
47
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
54,
58
]
}
],
"range": [
48,
59
]
}
],
"range": [
39,
61
]
}
],
"range": [
0,
61
]
}
],
"patch": "insert",
"range": [
0,
62
]
}
],
"range": [
0,
63
]
}
],
"hasChanges": true,
"range": [
0,
63
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
73,
86
]
},
{
"category": "Identifier",
"range": [
87,
91
]
},
{
"category": "Identifier",
"range": [
93,
97
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
101,
107
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
114,
118
]
}
],
"range": [
108,
119
]
}
],
"range": [
99,
121
]
}
],
"range": [
63,
121
]
}
],
"patch": "insert",
"range": [
63,
122
]
}
],
"range": [
63,
123
]
}
],
"hasChanges": true,
"range": [
63,
123
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
10,
23
]
},
{
"category": "Identifier",
"range": [
24,
28
]
},
{
"category": "Identifier",
"range": [
30,
34
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
38,
44
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
51,
55
]
}
],
"range": [
45,
56
]
}
],
"range": [
36,
58
]
}
],
"range": [
0,
58
]
}
],
"range": [
0,
59
]
}
],
"range": [
0,
60
]
}
],
"hasChanges": false,
"range": [
0,
60
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
133,
146
]
},
{
"category": "Identifier",
"range": [
147,
151
]
},
{
"category": "Identifier",
"range": [
153,
157
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
161,
167
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
174,
178
]
}
],
"range": [
168,
179
]
}
],
"range": [
159,
181
]
}
],
"range": [
123,
181
]
}
],
"range": [
123,
182
]
}
],
"range": [
123,
183
]
}
],
"hasChanges": false,
"range": [
123,
183
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
60,
60
]
}
],
"hasChanges": false,
"range": [
60,
60
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
183,
183
]
}
],
"hasChanges": false,
"range": [
183,
183
],
"number": 4
}
]
],
"paths": [
"generator-function.js",
"generator-function.js"
],
"oids": [
"04e8a59bc45444cc298c2142de90af10b8386bf3",
"ed5c0370f5abc30c2f381fe513447b205647aebc"
]
},
"filePaths": [
"generator-function.js"
],
"patch": [
"diff --git a/generator-function.js b/generator-function.js",
"index 04e8a59..ed5c037 100644",
"--- a/generator-function.js",
"+++ b/generator-function.js",
"@@ -1 +1,3 @@",
"+function *generateNewStuff(arg1, arg2) { yield; yield arg2; };",
"+function *generateStuff(arg1, arg2) { yield; yield arg2; };",
" function *generateStuff(arg1, arg2) { yield; yield arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "a4a896cba2216edee62cc9fe96efdbc5408fdb46..efb9d38a6460f6bac29b03924c33ee9bce0b26d2"
}
,{
"testCaseDescription": "javascript-generator-function-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
10,
26
]
},
{
"category": "Identifier",
"range": [
27,
31
]
},
{
"category": "Identifier",
"range": [
33,
37
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
41,
47
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
54,
58
]
}
],
"range": [
48,
59
]
}
],
"range": [
39,
61
]
}
],
"range": [
0,
61
]
}
],
"range": [
0,
62
]
}
],
"range": [
0,
63
]
}
],
"hasChanges": true,
"range": [
0,
63
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
10,
23
]
},
{
"category": "Identifier",
"range": [
24,
28
]
},
{
"category": "Identifier",
"range": [
30,
34
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
38,
44
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
51,
55
]
}
],
"range": [
45,
56
]
}
],
"range": [
36,
58
]
}
],
"range": [
0,
58
]
}
],
"range": [
0,
59
]
}
],
"range": [
0,
60
]
}
],
"hasChanges": true,
"range": [
0,
60
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
73,
86
]
},
{
"category": "Identifier",
"range": [
87,
91
]
},
{
"category": "Identifier",
"range": [
93,
97
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
101,
107
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
114,
118
]
}
],
"range": [
108,
119
]
}
],
"range": [
99,
121
]
}
],
"range": [
63,
121
]
}
],
"range": [
63,
122
]
}
],
"range": [
63,
123
]
}
],
"hasChanges": false,
"range": [
63,
123
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
70,
83
]
},
{
"category": "Identifier",
"range": [
84,
88
]
},
{
"category": "Identifier",
"range": [
90,
94
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
98,
104
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
111,
115
]
}
],
"range": [
105,
116
]
}
],
"range": [
96,
118
]
}
],
"range": [
60,
118
]
}
],
"range": [
60,
119
]
}
],
"range": [
60,
120
]
}
],
"hasChanges": false,
"range": [
60,
120
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
133,
146
]
},
{
"category": "Identifier",
"range": [
147,
151
]
},
{
"category": "Identifier",
"range": [
153,
157
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
161,
167
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
174,
178
]
}
],
"range": [
168,
179
]
}
],
"range": [
159,
181
]
}
],
"range": [
123,
181
]
}
],
"range": [
123,
182
]
}
],
"range": [
123,
183
]
}
],
"hasChanges": false,
"range": [
123,
183
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
130,
143
]
},
{
"category": "Identifier",
"range": [
144,
148
]
},
{
"category": "Identifier",
"range": [
150,
154
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
158,
164
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
171,
175
]
}
],
"range": [
165,
176
]
}
],
"range": [
156,
178
]
}
],
"range": [
120,
178
]
}
],
"range": [
120,
179
]
}
],
"range": [
120,
180
]
}
],
"hasChanges": false,
"range": [
120,
180
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
183,
183
]
}
],
"hasChanges": false,
"range": [
183,
183
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
180,
180
]
}
],
"hasChanges": false,
"range": [
180,
180
],
"number": 4
}
]
],
"paths": [
"generator-function.js",
"generator-function.js"
],
"oids": [
"ed5c0370f5abc30c2f381fe513447b205647aebc",
"0895c3fde3cba1e850e4730eb193f62270215e70"
]
},
"filePaths": [
"generator-function.js"
],
"patch": [
"diff --git a/generator-function.js b/generator-function.js",
"index ed5c037..0895c3f 100644",
"--- a/generator-function.js",
"+++ b/generator-function.js",
"@@ -1,3 +1,3 @@",
"-function *generateNewStuff(arg1, arg2) { yield; yield arg2; };",
"+function *generateStuff(arg1, arg2) { yield; yield arg2; };",
" function *generateStuff(arg1, arg2) { yield; yield arg2; };",
" function *generateStuff(arg1, arg2) { yield; yield arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "efb9d38a6460f6bac29b03924c33ee9bce0b26d2..129fc139ed29b7d14c49713f6297e118f3691d9c"
}
,{
"testCaseDescription": "javascript-generator-function-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
10,
23
]
},
{
"category": "Identifier",
"range": [
24,
28
]
},
{
"category": "Identifier",
"range": [
30,
34
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
38,
44
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
51,
55
]
}
],
"range": [
45,
56
]
}
],
"range": [
36,
58
]
}
],
"range": [
0,
58
]
}
],
"range": [
0,
59
]
}
],
"range": [
0,
60
]
}
],
"hasChanges": true,
"range": [
0,
60
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
10,
26
]
},
{
"category": "Identifier",
"range": [
27,
31
]
},
{
"category": "Identifier",
"range": [
33,
37
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
41,
47
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
54,
58
]
}
],
"range": [
48,
59
]
}
],
"range": [
39,
61
]
}
],
"range": [
0,
61
]
}
],
"range": [
0,
62
]
}
],
"range": [
0,
63
]
}
],
"hasChanges": true,
"range": [
0,
63
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
70,
83
]
},
{
"category": "Identifier",
"range": [
84,
88
]
},
{
"category": "Identifier",
"range": [
90,
94
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
98,
104
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
111,
115
]
}
],
"range": [
105,
116
]
}
],
"range": [
96,
118
]
}
],
"range": [
60,
118
]
}
],
"range": [
60,
119
]
}
],
"range": [
60,
120
]
}
],
"hasChanges": false,
"range": [
60,
120
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
73,
86
]
},
{
"category": "Identifier",
"range": [
87,
91
]
},
{
"category": "Identifier",
"range": [
93,
97
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
101,
107
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
114,
118
]
}
],
"range": [
108,
119
]
}
],
"range": [
99,
121
]
}
],
"range": [
63,
121
]
}
],
"range": [
63,
122
]
}
],
"range": [
63,
123
]
}
],
"hasChanges": false,
"range": [
63,
123
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
130,
143
]
},
{
"category": "Identifier",
"range": [
144,
148
]
},
{
"category": "Identifier",
"range": [
150,
154
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
158,
164
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
171,
175
]
}
],
"range": [
165,
176
]
}
],
"range": [
156,
178
]
}
],
"range": [
120,
178
]
}
],
"range": [
120,
179
]
}
],
"range": [
120,
180
]
}
],
"hasChanges": false,
"range": [
120,
180
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
133,
146
]
},
{
"category": "Identifier",
"range": [
147,
151
]
},
{
"category": "Identifier",
"range": [
153,
157
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
161,
167
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
174,
178
]
}
],
"range": [
168,
179
]
}
],
"range": [
159,
181
]
}
],
"range": [
123,
181
]
}
],
"range": [
123,
182
]
}
],
"range": [
123,
183
]
}
],
"hasChanges": false,
"range": [
123,
183
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
180,
180
]
}
],
"hasChanges": false,
"range": [
180,
180
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
183,
183
]
}
],
"hasChanges": false,
"range": [
183,
183
],
"number": 4
}
]
],
"paths": [
"generator-function.js",
"generator-function.js"
],
"oids": [
"0895c3fde3cba1e850e4730eb193f62270215e70",
"ed5c0370f5abc30c2f381fe513447b205647aebc"
]
},
"filePaths": [
"generator-function.js"
],
"patch": [
"diff --git a/generator-function.js b/generator-function.js",
"index 0895c3f..ed5c037 100644",
"--- a/generator-function.js",
"+++ b/generator-function.js",
"@@ -1,3 +1,3 @@",
"-function *generateStuff(arg1, arg2) { yield; yield arg2; };",
"+function *generateNewStuff(arg1, arg2) { yield; yield arg2; };",
" function *generateStuff(arg1, arg2) { yield; yield arg2; };",
" function *generateStuff(arg1, arg2) { yield; yield arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "129fc139ed29b7d14c49713f6297e118f3691d9c..0360112c551e3312985cfefd8c393f5ee1ea75ba"
}
,{
"testCaseDescription": "javascript-generator-function-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
10,
26
]
},
{
"category": "Identifier",
"range": [
27,
31
]
},
{
"category": "Identifier",
"range": [
33,
37
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
41,
47
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
54,
58
]
}
],
"range": [
48,
59
]
}
],
"range": [
39,
61
]
}
],
"range": [
0,
61
]
}
],
"patch": "delete",
"range": [
0,
62
]
}
],
"range": [
0,
63
]
}
],
"hasChanges": true,
"range": [
0,
63
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
73,
86
]
},
{
"category": "Identifier",
"range": [
87,
91
]
},
{
"category": "Identifier",
"range": [
93,
97
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
101,
107
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
114,
118
]
}
],
"range": [
108,
119
]
}
],
"range": [
99,
121
]
}
],
"range": [
63,
121
]
}
],
"patch": "delete",
"range": [
63,
122
]
}
],
"range": [
63,
123
]
}
],
"hasChanges": true,
"range": [
63,
123
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
133,
146
]
},
{
"category": "Identifier",
"range": [
147,
151
]
},
{
"category": "Identifier",
"range": [
153,
157
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
161,
167
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
174,
178
]
}
],
"range": [
168,
179
]
}
],
"range": [
159,
181
]
}
],
"range": [
123,
181
]
}
],
"range": [
123,
182
]
}
],
"range": [
123,
183
]
}
],
"hasChanges": false,
"range": [
123,
183
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
10,
23
]
},
{
"category": "Identifier",
"range": [
24,
28
]
},
{
"category": "Identifier",
"range": [
30,
34
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
38,
44
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
51,
55
]
}
],
"range": [
45,
56
]
}
],
"range": [
36,
58
]
}
],
"range": [
0,
58
]
}
],
"range": [
0,
59
]
}
],
"range": [
0,
60
]
}
],
"hasChanges": false,
"range": [
0,
60
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
70,
86
]
},
{
"category": "Identifier",
"range": [
87,
91
]
},
{
"category": "Identifier",
"range": [
93,
97
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
101,
107
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
114,
118
]
}
],
"range": [
108,
119
]
}
],
"range": [
99,
121
]
}
],
"range": [
60,
121
]
}
],
"patch": "insert",
"range": [
60,
122
]
}
],
"range": [
60,
123
]
}
],
"hasChanges": true,
"range": [
60,
123
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
183,
183
]
}
],
"hasChanges": false,
"range": [
183,
183
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
123,
123
]
}
],
"hasChanges": false,
"range": [
123,
123
],
"number": 3
}
]
],
"paths": [
"generator-function.js",
"generator-function.js"
],
"oids": [
"ed5c0370f5abc30c2f381fe513447b205647aebc",
"1dae1059cf36b86fdb5fa7cdf701f28709470b90"
]
},
"filePaths": [
"generator-function.js"
],
"patch": [
"diff --git a/generator-function.js b/generator-function.js",
"index ed5c037..1dae105 100644",
"--- a/generator-function.js",
"+++ b/generator-function.js",
"@@ -1,3 +1,2 @@",
"-function *generateNewStuff(arg1, arg2) { yield; yield arg2; };",
"-function *generateStuff(arg1, arg2) { yield; yield arg2; };",
" function *generateStuff(arg1, arg2) { yield; yield arg2; };",
"+function *generateNewStuff(arg1, arg2) { yield; yield arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "0360112c551e3312985cfefd8c393f5ee1ea75ba..cd60754110e1117c82342762bc3e2f924a91d2f7"
}
,{
"testCaseDescription": "javascript-generator-function-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
10,
23
]
},
{
"category": "Identifier",
"range": [
24,
28
]
},
{
"category": "Identifier",
"range": [
30,
34
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
38,
44
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
51,
55
]
}
],
"range": [
45,
56
]
}
],
"range": [
36,
58
]
}
],
"range": [
0,
58
]
}
],
"patch": "delete",
"range": [
0,
59
]
}
],
"range": [
0,
60
]
}
],
"hasChanges": true,
"range": [
0,
60
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
70,
86
]
},
{
"category": "Identifier",
"range": [
87,
91
]
},
{
"category": "Identifier",
"range": [
93,
97
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
101,
107
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
114,
118
]
}
],
"range": [
108,
119
]
}
],
"range": [
99,
121
]
}
],
"range": [
60,
121
]
}
],
"range": [
60,
122
]
}
],
"range": [
60,
123
]
}
],
"hasChanges": false,
"range": [
60,
123
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
10,
26
]
},
{
"category": "Identifier",
"range": [
27,
31
]
},
{
"category": "Identifier",
"range": [
33,
37
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
41,
47
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
54,
58
]
}
],
"range": [
48,
59
]
}
],
"range": [
39,
61
]
}
],
"range": [
0,
61
]
}
],
"range": [
0,
62
]
}
],
"range": [
0,
63
]
}
],
"hasChanges": false,
"range": [
0,
63
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
123,
123
]
}
],
"hasChanges": false,
"range": [
123,
123
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
63,
63
]
}
],
"hasChanges": false,
"range": [
63,
63
],
"number": 2
}
]
],
"paths": [
"generator-function.js",
"generator-function.js"
],
"oids": [
"1dae1059cf36b86fdb5fa7cdf701f28709470b90",
"5846d1c0997bed696b602367f89d69b35822caac"
]
},
"filePaths": [
"generator-function.js"
],
"patch": [
"diff --git a/generator-function.js b/generator-function.js",
"index 1dae105..5846d1c 100644",
"--- a/generator-function.js",
"+++ b/generator-function.js",
"@@ -1,2 +1 @@",
"-function *generateStuff(arg1, arg2) { yield; yield arg2; };",
" function *generateNewStuff(arg1, arg2) { yield; yield arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "cd60754110e1117c82342762bc3e2f924a91d2f7..99fb44113edd307ee060aa841b283093ac2d6f34"
}
,{
"testCaseDescription": "javascript-generator-function-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
10,
26
]
},
{
"category": "Identifier",
"range": [
27,
31
]
},
{
"category": "Identifier",
"range": [
33,
37
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "yield_statement",
"range": [
41,
47
]
},
{
"category": "yield_statement",
"children": [
{
"category": "Identifier",
"range": [
54,
58
]
}
],
"range": [
48,
59
]
}
],
"range": [
39,
61
]
}
],
"range": [
0,
61
]
}
],
"range": [
0,
62
]
}
],
"patch": "delete",
"range": [
0,
63
]
}
],
"hasChanges": true,
"range": [
0,
63
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
63,
63
]
}
],
"hasChanges": true,
"range": [
63,
63
],
"number": 2
}
]
],
"paths": [
"generator-function.js",
"generator-function.js"
],
"oids": [
"5846d1c0997bed696b602367f89d69b35822caac",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"generator-function.js"
],
"patch": [
"diff --git a/generator-function.js b/generator-function.js",
"index 5846d1c..e69de29 100644",
"--- a/generator-function.js",
"+++ b/generator-function.js",
"@@ -1 +0,0 @@",
"-function *generateNewStuff(arg1, arg2) { yield; yield arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "99fb44113edd307ee060aa841b283093ac2d6f34..e3b9f963811fa510e777ed818a75408691e53555"
}]