mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
2038 lines
92 KiB
JSON
2038 lines
92 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
20,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
28
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
28,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
28,
|
|
28
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-parameterless-function.js",
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"4a26ae863437e7a845005d5619eafbe434a03c73"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"sha1": "73c51c5bcee82482aa21bee3656bb0f088267d06",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "fc4c40ce69afa4fc42777411b71d421efda5e748"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
20,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
31
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
44,
|
|
56
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
31,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
31,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
31,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
31,
|
|
59
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
20,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
28
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
79,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
72,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
86
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
86
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
59,
|
|
87
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
28,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
28,
|
|
28
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
87,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
87,
|
|
87
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-parameterless-function.js",
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"oids": [
|
|
"4a26ae863437e7a845005d5619eafbe434a03c73",
|
|
"c31dd4b71a0a91b55871b3d9b1e45443222e53ec"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"sha1": "fc4c40ce69afa4fc42777411b71d421efda5e748",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "c4ec77d3a97aad5be342c03ac87cc68e309cd039"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
20,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
31
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
20,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
28
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
44,
|
|
56
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
31,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
31,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
31,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
31,
|
|
59
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
48,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
41,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
39,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
56
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
56
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
28,
|
|
56
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
79,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
72,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
86
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
86
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
59,
|
|
87
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
76,
|
|
80
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
69,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
67,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
56,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
56,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
56,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
56,
|
|
84
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
87,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
87,
|
|
87
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
84,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
84,
|
|
84
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-parameterless-function.js",
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"oids": [
|
|
"c31dd4b71a0a91b55871b3d9b1e45443222e53ec",
|
|
"6b1efa42e992001f0f5c16f8a263156d2352547b"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"sha1": "c4ec77d3a97aad5be342c03ac87cc68e309cd039",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "fdc0a653fa9d69e27fcdb21442763c7463f31aaf"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
20,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
28
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
20,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
31
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
48,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
41,
|
|
53
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
39,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
56
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
56
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
28,
|
|
56
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
44,
|
|
56
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
31,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
31,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
31,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
31,
|
|
59
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
76,
|
|
80
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
69,
|
|
81
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
67,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
56,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
56,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
56,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
56,
|
|
84
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
79,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
72,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
86
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
86
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
59,
|
|
87
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
84,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
84,
|
|
84
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
87,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
87,
|
|
87
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-parameterless-function.js",
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"oids": [
|
|
"6b1efa42e992001f0f5c16f8a263156d2352547b",
|
|
"c31dd4b71a0a91b55871b3d9b1e45443222e53ec"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"sha1": "fdc0a653fa9d69e27fcdb21442763c7463f31aaf",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "e4641ceb3959beb53373d73aa75e7041d05ef5fa"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
20,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
31
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
51,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
44,
|
|
56
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
42,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
31,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
31,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
31,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
31,
|
|
59
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
79,
|
|
83
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
72,
|
|
84
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
70,
|
|
86
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
86
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
59,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
59,
|
|
87
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
20,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
28
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
48,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
41,
|
|
56
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
39,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
28,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
28,
|
|
59
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
87,
|
|
87
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
87,
|
|
87
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
59,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
59,
|
|
59
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-parameterless-function.js",
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"oids": [
|
|
"c31dd4b71a0a91b55871b3d9b1e45443222e53ec",
|
|
"b8e05c0e18b2183be864b6277f1d072c03527ee3"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"sha1": "e4641ceb3959beb53373d73aa75e7041d05ef5fa",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "c1d24320c7b661a45f3db080dd7148bc09a9a338"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
20,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
28
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
48,
|
|
55
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
41,
|
|
56
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
39,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
58
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
28,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
28,
|
|
59
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
20,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
31
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
59,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
59,
|
|
59
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
31,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
31,
|
|
31
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-parameterless-function.js",
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"oids": [
|
|
"b8e05c0e18b2183be864b6277f1d072c03527ee3",
|
|
"ce1ef83341ff771f6306c08175696a70c3866eef"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"sha1": "c1d24320c7b661a45f3db080dd7148bc09a9a338",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "1de53d6875b2a27537f43c6f83ca93dee4c05bab"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-parameterless-function-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Function",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
20,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
13,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
11,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
31
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
31,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
31,
|
|
31
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"anonymous-parameterless-function.js",
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"oids": [
|
|
"ce1ef83341ff771f6306c08175696a70c3866eef",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"anonymous-parameterless-function.js"
|
|
],
|
|
"sha1": "1de53d6875b2a27537f43c6f83ca93dee4c05bab",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "555eae94dfe97846b78ac17b4f87bf1ea0ff2baf"
|
|
}]
|