mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
2099 lines
95 KiB
JSON
2099 lines
95 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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index e69de29..4a26ae8 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+function() { return 'hi'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b6fb98d6c49e32009671313bca0c3f8b9f01f8d4..90907a7b09e75e065f750c20ebfd4e4dc338606c"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index 4a26ae8..c31dd4b 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+function() { return 'hello'; }",
|
|
"+function() { return 'hi'; }",
|
|
" function() { return 'hi'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "90907a7b09e75e065f750c20ebfd4e4dc338606c..7502e8aa7b1be8e9fccfb8a13d7a4198e2e6bfaf"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index c31dd4b..6b1efa4 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function() { return 'hello'; }",
|
|
"+function() { return 'hi'; }",
|
|
" function() { return 'hi'; }",
|
|
" function() { return 'hi'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7502e8aa7b1be8e9fccfb8a13d7a4198e2e6bfaf..bd22ef3539284345f997eb0db0dc499250191ec8"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index 6b1efa4..c31dd4b 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function() { return 'hi'; }",
|
|
"+function() { return 'hello'; }",
|
|
" function() { return 'hi'; }",
|
|
" function() { return 'hi'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "bd22ef3539284345f997eb0db0dc499250191ec8..0e4f4ffdb14d066c264de5949c5676a620be32f3"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index c31dd4b..b8e05c0 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-function() { return 'hello'; }",
|
|
"-function() { return 'hi'; }",
|
|
" function() { return 'hi'; }",
|
|
"+function() { return 'hello'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "0e4f4ffdb14d066c264de5949c5676a620be32f3..d03a8c9a2bf8e64daedb6d617fa97ff6d8215b64"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index b8e05c0..ce1ef83 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-function() { return 'hi'; }",
|
|
" function() { return 'hello'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d03a8c9a2bf8e64daedb6d617fa97ff6d8215b64..61b53588ccb1690db4be3c566dc13037f86e2631"
|
|
}
|
|
,{
|
|
"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"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-parameterless-function.js b/anonymous-parameterless-function.js",
|
|
"index ce1ef83..e69de29 100644",
|
|
"--- a/anonymous-parameterless-function.js",
|
|
"+++ b/anonymous-parameterless-function.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-function() { return 'hello'; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "61b53588ccb1690db4be3c566dc13037f86e2631..d85c24526768ef13d44a0e8cce5aefe270e43c4a"
|
|
}]
|