1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
semantic/test/corpus/json/javascript/named-function.json

2541 lines
120 KiB
JSON
Raw Normal View History

[{
"testCaseDescription": "javascript-named-function-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
19
]
},
{
"category": "Identifier",
"range": [
20,
24
]
},
{
"category": "Identifier",
"range": [
26,
30
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
34,
38
]
}
],
"range": [
34,
39
]
}
],
"range": [
32,
41
]
}
],
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"patch": "insert",
"range": [
0,
43
]
}
],
"hasChanges": true,
"range": [
0,
43
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
43,
43
]
}
],
"hasChanges": true,
"range": [
43,
43
],
"number": 2
}
]
],
"paths": [
"named-function.js",
"named-function.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"94b19f8eb1eb7d5e14e197559feaacf01465c358"
]
},
"filePaths": [
"named-function.js"
],
"patch": [
"diff --git a/named-function.js b/named-function.js",
"index e69de29..94b19f8 100644",
"--- a/named-function.js",
"+++ b/named-function.js",
"@@ -0,0 +1 @@",
"+function myFunction(arg1, arg2) { arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "e3b9f963811fa510e777ed818a75408691e53555..26ef45fff727a1d92e4e7838001a2b035fc278e8"
}
,{
"testCaseDescription": "javascript-named-function-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
24
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
36,
41
]
}
],
"range": [
29,
42
]
}
],
"range": [
27,
44
]
}
],
"range": [
0,
44
]
}
],
"patch": "insert",
"range": [
0,
45
]
}
],
"range": [
0,
46
]
}
],
"hasChanges": true,
"range": [
0,
46
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
55,
65
]
},
{
"category": "Identifier",
"range": [
66,
70
]
},
{
"category": "Identifier",
"range": [
72,
76
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
80,
84
]
}
],
"range": [
80,
85
]
}
],
"range": [
78,
87
]
}
],
"range": [
46,
87
]
}
],
"patch": "insert",
"range": [
46,
88
]
}
],
"range": [
46,
89
]
}
],
"hasChanges": true,
"range": [
46,
89
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
19
]
},
{
"category": "Identifier",
"range": [
20,
24
]
},
{
"category": "Identifier",
"range": [
26,
30
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
34,
38
]
}
],
"range": [
34,
39
]
}
],
"range": [
32,
41
]
}
],
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"range": [
0,
43
]
}
],
"hasChanges": false,
"range": [
0,
43
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
98,
108
]
},
{
"category": "Identifier",
"range": [
109,
113
]
},
{
"category": "Identifier",
"range": [
115,
119
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
123,
127
]
}
],
"range": [
123,
128
]
}
],
"range": [
121,
130
]
}
],
"range": [
89,
130
]
}
],
"range": [
89,
131
]
}
],
"range": [
89,
132
]
}
],
"hasChanges": false,
"range": [
89,
132
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
43,
43
]
}
],
"hasChanges": false,
"range": [
43,
43
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
132,
132
]
}
],
"hasChanges": false,
"range": [
132,
132
],
"number": 4
}
]
],
"paths": [
"named-function.js",
"named-function.js"
],
"oids": [
"94b19f8eb1eb7d5e14e197559feaacf01465c358",
"cb766a0e05101d1697005bb235aedfb5c1e1869e"
]
},
"filePaths": [
"named-function.js"
],
"patch": [
"diff --git a/named-function.js b/named-function.js",
"index 94b19f8..cb766a0 100644",
"--- a/named-function.js",
"+++ b/named-function.js",
"@@ -1 +1,3 @@",
"+function anotherFunction() { return false; };",
"+function myFunction(arg1, arg2) { arg2; };",
" function myFunction(arg1, arg2) { arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "26ef45fff727a1d92e4e7838001a2b035fc278e8..75a5271cdbee078430f84c42f7d1d117412b1113"
}
,{
"testCaseDescription": "javascript-named-function-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
9,
24
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
36,
41
]
}
],
"patch": "delete",
"range": [
29,
42
]
}
],
"range": [
27,
44
]
}
],
"range": [
0,
44
]
}
],
"range": [
0,
45
]
}
],
"range": [
0,
46
]
}
],
"hasChanges": true,
"range": [
0,
46
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
9,
19
]
},
{
"category": "Identifier",
"patch": "insert",
"range": [
20,
24
]
},
{
"category": "Identifier",
"patch": "insert",
"range": [
26,
30
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
34,
38
]
}
],
"patch": "insert",
"range": [
34,
39
]
}
],
"range": [
32,
41
]
}
],
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"range": [
0,
43
]
}
],
"hasChanges": true,
"range": [
0,
43
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
55,
65
]
},
{
"category": "Identifier",
"range": [
66,
70
]
},
{
"category": "Identifier",
"range": [
72,
76
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
80,
84
]
}
],
"range": [
80,
85
]
}
],
"range": [
78,
87
]
}
],
"range": [
46,
87
]
}
],
"range": [
46,
88
]
}
],
"range": [
46,
89
]
}
],
"hasChanges": false,
"range": [
46,
89
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
52,
62
]
},
{
"category": "Identifier",
"range": [
63,
67
]
},
{
"category": "Identifier",
"range": [
69,
73
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
77,
81
]
}
],
"range": [
77,
82
]
}
],
"range": [
75,
84
]
}
],
"range": [
43,
84
]
}
],
"range": [
43,
85
]
}
],
"range": [
43,
86
]
}
],
"hasChanges": false,
"range": [
43,
86
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
98,
108
]
},
{
"category": "Identifier",
"range": [
109,
113
]
},
{
"category": "Identifier",
"range": [
115,
119
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
123,
127
]
}
],
"range": [
123,
128
]
}
],
"range": [
121,
130
]
}
],
"range": [
89,
130
]
}
],
"range": [
89,
131
]
}
],
"range": [
89,
132
]
}
],
"hasChanges": false,
"range": [
89,
132
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
95,
105
]
},
{
"category": "Identifier",
"range": [
106,
110
]
},
{
"category": "Identifier",
"range": [
112,
116
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
120,
124
]
}
],
"range": [
120,
125
]
}
],
"range": [
118,
127
]
}
],
"range": [
86,
127
]
}
],
"range": [
86,
128
]
}
],
"range": [
86,
129
]
}
],
"hasChanges": false,
"range": [
86,
129
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
132,
132
]
}
],
"hasChanges": false,
"range": [
132,
132
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
129,
129
]
}
],
"hasChanges": false,
"range": [
129,
129
],
"number": 4
}
]
],
"paths": [
"named-function.js",
"named-function.js"
],
"oids": [
"cb766a0e05101d1697005bb235aedfb5c1e1869e",
"c9cff07773192e8f646366ac816f1a7bf06cbbcc"
]
},
"filePaths": [
"named-function.js"
],
"patch": [
"diff --git a/named-function.js b/named-function.js",
"index cb766a0..c9cff07 100644",
"--- a/named-function.js",
"+++ b/named-function.js",
"@@ -1,3 +1,3 @@",
"-function anotherFunction() { return false; };",
"+function myFunction(arg1, arg2) { arg2; };",
" function myFunction(arg1, arg2) { arg2; };",
" function myFunction(arg1, arg2) { arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "75a5271cdbee078430f84c42f7d1d117412b1113..09c3cd31554ad0960c5587fc0bea5d6c63208af1"
}
,{
"testCaseDescription": "javascript-named-function-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
9,
19
]
},
{
"category": "Identifier",
"patch": "delete",
"range": [
20,
24
]
},
{
"category": "Identifier",
"patch": "delete",
"range": [
26,
30
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
34,
38
]
}
],
"patch": "delete",
"range": [
34,
39
]
}
],
"range": [
32,
41
]
}
],
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"range": [
0,
43
]
}
],
"hasChanges": true,
"range": [
0,
43
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
9,
24
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
36,
41
]
}
],
"patch": "insert",
"range": [
29,
42
]
}
],
"range": [
27,
44
]
}
],
"range": [
0,
44
]
}
],
"range": [
0,
45
]
}
],
"range": [
0,
46
]
}
],
"hasChanges": true,
"range": [
0,
46
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
52,
62
]
},
{
"category": "Identifier",
"range": [
63,
67
]
},
{
"category": "Identifier",
"range": [
69,
73
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
77,
81
]
}
],
"range": [
77,
82
]
}
],
"range": [
75,
84
]
}
],
"range": [
43,
84
]
}
],
"range": [
43,
85
]
}
],
"range": [
43,
86
]
}
],
"hasChanges": false,
"range": [
43,
86
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
55,
65
]
},
{
"category": "Identifier",
"range": [
66,
70
]
},
{
"category": "Identifier",
"range": [
72,
76
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
80,
84
]
}
],
"range": [
80,
85
]
}
],
"range": [
78,
87
]
}
],
"range": [
46,
87
]
}
],
"range": [
46,
88
]
}
],
"range": [
46,
89
]
}
],
"hasChanges": false,
"range": [
46,
89
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
95,
105
]
},
{
"category": "Identifier",
"range": [
106,
110
]
},
{
"category": "Identifier",
"range": [
112,
116
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
120,
124
]
}
],
"range": [
120,
125
]
}
],
"range": [
118,
127
]
}
],
"range": [
86,
127
]
}
],
"range": [
86,
128
]
}
],
"range": [
86,
129
]
}
],
"hasChanges": false,
"range": [
86,
129
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
98,
108
]
},
{
"category": "Identifier",
"range": [
109,
113
]
},
{
"category": "Identifier",
"range": [
115,
119
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
123,
127
]
}
],
"range": [
123,
128
]
}
],
"range": [
121,
130
]
}
],
"range": [
89,
130
]
}
],
"range": [
89,
131
]
}
],
"range": [
89,
132
]
}
],
"hasChanges": false,
"range": [
89,
132
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
129,
129
]
}
],
"hasChanges": false,
"range": [
129,
129
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
132,
132
]
}
],
"hasChanges": false,
"range": [
132,
132
],
"number": 4
}
]
],
"paths": [
"named-function.js",
"named-function.js"
],
"oids": [
"c9cff07773192e8f646366ac816f1a7bf06cbbcc",
"cb766a0e05101d1697005bb235aedfb5c1e1869e"
]
},
"filePaths": [
"named-function.js"
],
"patch": [
"diff --git a/named-function.js b/named-function.js",
"index c9cff07..cb766a0 100644",
"--- a/named-function.js",
"+++ b/named-function.js",
"@@ -1,3 +1,3 @@",
"-function myFunction(arg1, arg2) { arg2; };",
"+function anotherFunction() { return false; };",
" function myFunction(arg1, arg2) { arg2; };",
" function myFunction(arg1, arg2) { arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "09c3cd31554ad0960c5587fc0bea5d6c63208af1..780f471ede93bca59163186bb3b949234cbb34ad"
}
,{
"testCaseDescription": "javascript-named-function-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
24
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
36,
41
]
}
],
"range": [
29,
42
]
}
],
"range": [
27,
44
]
}
],
"range": [
0,
44
]
}
],
"patch": "delete",
"range": [
0,
45
]
}
],
"range": [
0,
46
]
}
],
"hasChanges": true,
"range": [
0,
46
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
55,
65
]
},
{
"category": "Identifier",
"range": [
66,
70
]
},
{
"category": "Identifier",
"range": [
72,
76
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
80,
84
]
}
],
"range": [
80,
85
]
}
],
"range": [
78,
87
]
}
],
"range": [
46,
87
]
}
],
"patch": "delete",
"range": [
46,
88
]
}
],
"range": [
46,
89
]
}
],
"hasChanges": true,
"range": [
46,
89
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
98,
108
]
},
{
"category": "Identifier",
"range": [
109,
113
]
},
{
"category": "Identifier",
"range": [
115,
119
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
123,
127
]
}
],
"range": [
123,
128
]
}
],
"range": [
121,
130
]
}
],
"range": [
89,
130
]
}
],
"range": [
89,
131
]
}
],
"range": [
89,
132
]
}
],
"hasChanges": false,
"range": [
89,
132
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
19
]
},
{
"category": "Identifier",
"range": [
20,
24
]
},
{
"category": "Identifier",
"range": [
26,
30
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
34,
38
]
}
],
"range": [
34,
39
]
}
],
"range": [
32,
41
]
}
],
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"range": [
0,
43
]
}
],
"hasChanges": false,
"range": [
0,
43
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
52,
67
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
79,
84
]
}
],
"range": [
72,
85
]
}
],
"range": [
70,
87
]
}
],
"range": [
43,
87
]
}
],
"patch": "insert",
"range": [
43,
88
]
}
],
"range": [
43,
89
]
}
],
"hasChanges": true,
"range": [
43,
89
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
132,
132
]
}
],
"hasChanges": false,
"range": [
132,
132
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
89,
89
]
}
],
"hasChanges": false,
"range": [
89,
89
],
"number": 3
}
]
],
"paths": [
"named-function.js",
"named-function.js"
],
"oids": [
"cb766a0e05101d1697005bb235aedfb5c1e1869e",
"148bcc771954af656fac03fd1f2070200dac9b89"
]
},
"filePaths": [
"named-function.js"
],
"patch": [
"diff --git a/named-function.js b/named-function.js",
"index cb766a0..148bcc7 100644",
"--- a/named-function.js",
"+++ b/named-function.js",
"@@ -1,3 +1,2 @@",
"-function anotherFunction() { return false; };",
"-function myFunction(arg1, arg2) { arg2; };",
" function myFunction(arg1, arg2) { arg2; };",
"+function anotherFunction() { return false; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "780f471ede93bca59163186bb3b949234cbb34ad..0d92f7f8cad59587e7bdcfdeee9fbdb9ccc97834"
}
,{
"testCaseDescription": "javascript-named-function-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
19
]
},
{
"category": "Identifier",
"range": [
20,
24
]
},
{
"category": "Identifier",
"range": [
26,
30
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
34,
38
]
}
],
"range": [
34,
39
]
}
],
"range": [
32,
41
]
}
],
"range": [
0,
41
]
}
],
"patch": "delete",
"range": [
0,
42
]
}
],
"range": [
0,
43
]
}
],
"hasChanges": true,
"range": [
0,
43
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
52,
67
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
79,
84
]
}
],
"range": [
72,
85
]
}
],
"range": [
70,
87
]
}
],
"range": [
43,
87
]
}
],
"range": [
43,
88
]
}
],
"range": [
43,
89
]
}
],
"hasChanges": false,
"range": [
43,
89
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
24
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
36,
41
]
}
],
"range": [
29,
42
]
}
],
"range": [
27,
44
]
}
],
"range": [
0,
44
]
}
],
"range": [
0,
45
]
}
],
"range": [
0,
46
]
}
],
"hasChanges": false,
"range": [
0,
46
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
89,
89
]
}
],
"hasChanges": false,
"range": [
89,
89
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
46,
46
]
}
],
"hasChanges": false,
"range": [
46,
46
],
"number": 2
}
]
],
"paths": [
"named-function.js",
"named-function.js"
],
"oids": [
"148bcc771954af656fac03fd1f2070200dac9b89",
"80e11b021534ad3a70c0ed32d90b7fd5b31b1f37"
]
},
"filePaths": [
"named-function.js"
],
"patch": [
"diff --git a/named-function.js b/named-function.js",
"index 148bcc7..80e11b0 100644",
"--- a/named-function.js",
"+++ b/named-function.js",
"@@ -1,2 +1 @@",
"-function myFunction(arg1, arg2) { arg2; };",
" function anotherFunction() { return false; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "0d92f7f8cad59587e7bdcfdeee9fbdb9ccc97834..8ca0ac128c264aae6e22d2fd2d5d7afe05a25226"
}
,{
"testCaseDescription": "javascript-named-function-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Function",
"children": [
{
"category": "Identifier",
"range": [
9,
24
]
},
{
"category": "ExpressionStatements",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
36,
41
]
}
],
"range": [
29,
42
]
}
],
"range": [
27,
44
]
}
],
"range": [
0,
44
]
}
],
"range": [
0,
45
]
}
],
"patch": "delete",
"range": [
0,
46
]
}
],
"hasChanges": true,
"range": [
0,
46
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
46,
46
]
}
],
"hasChanges": true,
"range": [
46,
46
],
"number": 2
}
]
],
"paths": [
"named-function.js",
"named-function.js"
],
"oids": [
"80e11b021534ad3a70c0ed32d90b7fd5b31b1f37",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"named-function.js"
],
"patch": [
"diff --git a/named-function.js b/named-function.js",
"index 80e11b0..e69de29 100644",
"--- a/named-function.js",
"+++ b/named-function.js",
"@@ -1 +0,0 @@",
"-function anotherFunction() { return false; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "8ca0ac128c264aae6e22d2fd2d5d7afe05a25226..6bb7b92e6660b4bea6500b17891e6215571694a1"
}]