mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
1401 lines
47 KiB
JSON
1401 lines
47 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-false-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
7,
|
|
7
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"false.js",
|
|
"false.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"8a63946258eddc17ba51e2165b17aa50e3ebc9fa"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"false.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/false.js b/false.js",
|
|
"index e69de29..8a63946 100644",
|
|
"--- a/false.js",
|
|
"+++ b/false.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+false;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "163b832af7eb86fe2d319810d137565e70a924f4..534e91d885497e33f825d5c9e7e90ef4986e83b6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-false-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
14
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
21,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
28
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
7
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
28,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
28,
|
|
28
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"false.js",
|
|
"false.js"
|
|
],
|
|
"oids": [
|
|
"8a63946258eddc17ba51e2165b17aa50e3ebc9fa",
|
|
"86574b160b9b16b2cac96835fe478e05aa257d42"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"false.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/false.js b/false.js",
|
|
"index 8a63946..86574b1 100644",
|
|
"--- a/false.js",
|
|
"+++ b/false.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+return false;",
|
|
"+false;",
|
|
" false;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "534e91d885497e33f825d5c9e7e90ef4986e83b6..f57bd598b66633b00684cbdb1b4d9ee81148d197"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-false-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
14
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
14
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
21,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
28
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
28,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
28,
|
|
28
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
21,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
21
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"false.js",
|
|
"false.js"
|
|
],
|
|
"oids": [
|
|
"86574b160b9b16b2cac96835fe478e05aa257d42",
|
|
"7bae7c53c216d4d18782c027934c3d80e003de0e"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"false.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/false.js b/false.js",
|
|
"index 86574b1..7bae7c5 100644",
|
|
"--- a/false.js",
|
|
"+++ b/false.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-return false;",
|
|
"+false;",
|
|
" false;",
|
|
" false;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f57bd598b66633b00684cbdb1b4d9ee81148d197..09585d310062f9fe315c2a400c69cb13cf67675a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-false-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
14
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
14
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
21,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
28
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
21,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
21
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
28,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
28,
|
|
28
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"false.js",
|
|
"false.js"
|
|
],
|
|
"oids": [
|
|
"7bae7c53c216d4d18782c027934c3d80e003de0e",
|
|
"86574b160b9b16b2cac96835fe478e05aa257d42"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"false.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/false.js b/false.js",
|
|
"index 7bae7c5..86574b1 100644",
|
|
"--- a/false.js",
|
|
"+++ b/false.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-false;",
|
|
"+return false;",
|
|
" false;",
|
|
" false;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "09585d310062f9fe315c2a400c69cb13cf67675a..ed00e5f614db396d4d52c2bacefb89580ad7fbba"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-false-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
14
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
21,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
27
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
21,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
28
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
7,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
7,
|
|
21
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
28,
|
|
28
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
28,
|
|
28
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
21,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
21
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"false.js",
|
|
"false.js"
|
|
],
|
|
"oids": [
|
|
"86574b160b9b16b2cac96835fe478e05aa257d42",
|
|
"85b5be918c88b57b1186a126d787a5e8971480d5"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"false.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/false.js b/false.js",
|
|
"index 86574b1..85b5be9 100644",
|
|
"--- a/false.js",
|
|
"+++ b/false.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-return false;",
|
|
"-false;",
|
|
" false;",
|
|
"+return false;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "ed00e5f614db396d4d52c2bacefb89580ad7fbba..d8c0287cc65dc125d283d6aa0e6cd32a3d5e1e31"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-false-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
21
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
14
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
21,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
21
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
14,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
14
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"false.js",
|
|
"false.js"
|
|
],
|
|
"oids": [
|
|
"85b5be918c88b57b1186a126d787a5e8971480d5",
|
|
"1f328b3bd0042696e3a2181ff33dd4abb9103b2d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"false.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/false.js b/false.js",
|
|
"index 85b5be9..1f328b3 100644",
|
|
"--- a/false.js",
|
|
"+++ b/false.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-false;",
|
|
" return false;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d8c0287cc65dc125d283d6aa0e6cd32a3d5e1e31..cd36fb39c2618d389cd4fd7511eded4aa0bdccf2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-false-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Return",
|
|
"children": [
|
|
{
|
|
"category": "Boolean",
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
14
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
14,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
14,
|
|
14
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"false.js",
|
|
"false.js"
|
|
],
|
|
"oids": [
|
|
"1f328b3bd0042696e3a2181ff33dd4abb9103b2d",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"false.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/false.js b/false.js",
|
|
"index 1f328b3..e69de29 100644",
|
|
"--- a/false.js",
|
|
"+++ b/false.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-return false;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "cd36fb39c2618d389cd4fd7511eded4aa0bdccf2..025ac2dcb7ae8e622fb5a7f0508e2ec9e15604f8"
|
|
}]
|