1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00
semantic/test/corpus/json/javascript/true.json
2016-11-01 10:19:04 -05:00

1340 lines
46 KiB
JSON

[{
"testCaseDescription": "javascript-true-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
0,
4
]
}
],
"range": [
0,
5
]
}
],
"patch": "insert",
"range": [
0,
6
]
}
],
"hasChanges": true,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
6,
6
]
}
],
"hasChanges": true,
"range": [
6,
6
],
"number": 2
}
]
],
"paths": [
"true.js",
"true.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"4203d4b4a3d7a7ffe249a29e7bd2e88140be59dd"
]
},
"filePaths": [
"true.js"
],
"sha1": "20d2c012fbfa3774153c1ec275408bafeecfcca9",
"gitDir": "test/corpus/repos/javascript",
"sha2": "4789d9a0142916354237099f42d6b88f0c2d2e99"
}
,{
"testCaseDescription": "javascript-true-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
7,
11
]
}
],
"patch": "insert",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
13,
17
]
}
],
"patch": "insert",
"range": [
13,
18
]
}
],
"range": [
13,
19
]
}
],
"hasChanges": true,
"range": [
13,
19
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
0,
4
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": false,
"range": [
0,
6
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
19,
23
]
}
],
"range": [
19,
24
]
}
],
"range": [
19,
25
]
}
],
"hasChanges": false,
"range": [
19,
25
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
6,
6
]
}
],
"hasChanges": false,
"range": [
6,
6
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
25,
25
]
}
],
"hasChanges": false,
"range": [
25,
25
],
"number": 4
}
]
],
"paths": [
"true.js",
"true.js"
],
"oids": [
"4203d4b4a3d7a7ffe249a29e7bd2e88140be59dd",
"65b6323fa6e3d1d5f619b0742e311333eb88bc52"
]
},
"filePaths": [
"true.js"
],
"sha1": "4789d9a0142916354237099f42d6b88f0c2d2e99",
"gitDir": "test/corpus/repos/javascript",
"sha2": "df73cd7d47cd4cf3f908caac7ec01a773c62df05"
}
,{
"testCaseDescription": "javascript-true-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
7,
11
]
}
],
"patch": "delete",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
0,
4
]
}
],
"patch": "insert",
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": true,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
13,
17
]
}
],
"range": [
13,
18
]
}
],
"range": [
13,
19
]
}
],
"hasChanges": false,
"range": [
13,
19
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
6,
10
]
}
],
"range": [
6,
11
]
}
],
"range": [
6,
12
]
}
],
"hasChanges": false,
"range": [
6,
12
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
19,
23
]
}
],
"range": [
19,
24
]
}
],
"range": [
19,
25
]
}
],
"hasChanges": false,
"range": [
19,
25
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
12,
16
]
}
],
"range": [
12,
17
]
}
],
"range": [
12,
18
]
}
],
"hasChanges": false,
"range": [
12,
18
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
25,
25
]
}
],
"hasChanges": false,
"range": [
25,
25
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
18,
18
]
}
],
"hasChanges": false,
"range": [
18,
18
],
"number": 4
}
]
],
"paths": [
"true.js",
"true.js"
],
"oids": [
"65b6323fa6e3d1d5f619b0742e311333eb88bc52",
"91e1cfc76c4e40fc45d40374371ccc035bb02ff0"
]
},
"filePaths": [
"true.js"
],
"sha1": "df73cd7d47cd4cf3f908caac7ec01a773c62df05",
"gitDir": "test/corpus/repos/javascript",
"sha2": "46d159de4494dab045050f7941d42bfb36e25cc5"
}
,{
"testCaseDescription": "javascript-true-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
0,
4
]
}
],
"patch": "delete",
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": true,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
7,
11
]
}
],
"patch": "insert",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
6,
10
]
}
],
"range": [
6,
11
]
}
],
"range": [
6,
12
]
}
],
"hasChanges": false,
"range": [
6,
12
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
13,
17
]
}
],
"range": [
13,
18
]
}
],
"range": [
13,
19
]
}
],
"hasChanges": false,
"range": [
13,
19
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
12,
16
]
}
],
"range": [
12,
17
]
}
],
"range": [
12,
18
]
}
],
"hasChanges": false,
"range": [
12,
18
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
19,
23
]
}
],
"range": [
19,
24
]
}
],
"range": [
19,
25
]
}
],
"hasChanges": false,
"range": [
19,
25
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
18,
18
]
}
],
"hasChanges": false,
"range": [
18,
18
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
25,
25
]
}
],
"hasChanges": false,
"range": [
25,
25
],
"number": 4
}
]
],
"paths": [
"true.js",
"true.js"
],
"oids": [
"91e1cfc76c4e40fc45d40374371ccc035bb02ff0",
"65b6323fa6e3d1d5f619b0742e311333eb88bc52"
]
},
"filePaths": [
"true.js"
],
"sha1": "46d159de4494dab045050f7941d42bfb36e25cc5",
"gitDir": "test/corpus/repos/javascript",
"sha2": "0d81dac90113cf185350bba3a71d5c608325003f"
}
,{
"testCaseDescription": "javascript-true-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
7,
11
]
}
],
"patch": "delete",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
13,
17
]
}
],
"patch": "delete",
"range": [
13,
18
]
}
],
"range": [
13,
19
]
}
],
"hasChanges": true,
"range": [
13,
19
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
19,
23
]
}
],
"range": [
19,
24
]
}
],
"range": [
19,
25
]
}
],
"hasChanges": false,
"range": [
19,
25
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
0,
4
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": false,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
13,
17
]
}
],
"patch": "insert",
"range": [
6,
18
]
}
],
"range": [
6,
19
]
}
],
"hasChanges": true,
"range": [
6,
19
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
25,
25
]
}
],
"hasChanges": false,
"range": [
25,
25
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
19,
19
]
}
],
"hasChanges": false,
"range": [
19,
19
],
"number": 3
}
]
],
"paths": [
"true.js",
"true.js"
],
"oids": [
"65b6323fa6e3d1d5f619b0742e311333eb88bc52",
"48a44d128292e7de57cb187c6f86aa892945c737"
]
},
"filePaths": [
"true.js"
],
"sha1": "0d81dac90113cf185350bba3a71d5c608325003f",
"gitDir": "test/corpus/repos/javascript",
"sha2": "6484ee9740e0cdb59d3f8ab3877644e371cf0667"
}
,{
"testCaseDescription": "javascript-true-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Boolean",
"range": [
0,
4
]
}
],
"patch": "delete",
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": true,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
13,
17
]
}
],
"range": [
6,
18
]
}
],
"range": [
6,
19
]
}
],
"hasChanges": false,
"range": [
6,
19
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
7,
11
]
}
],
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": false,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
19,
19
]
}
],
"hasChanges": false,
"range": [
19,
19
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
13,
13
]
}
],
"hasChanges": false,
"range": [
13,
13
],
"number": 2
}
]
],
"paths": [
"true.js",
"true.js"
],
"oids": [
"48a44d128292e7de57cb187c6f86aa892945c737",
"c1c6922d1dfea3f2e582e55796f6fdf98eaeaad3"
]
},
"filePaths": [
"true.js"
],
"sha1": "6484ee9740e0cdb59d3f8ab3877644e371cf0667",
"gitDir": "test/corpus/repos/javascript",
"sha2": "087fc0349e3fbaba876282869c1104339ccbd22d"
}
,{
"testCaseDescription": "javascript-true-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Boolean",
"range": [
7,
11
]
}
],
"range": [
0,
12
]
}
],
"patch": "delete",
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
13,
13
]
}
],
"hasChanges": true,
"range": [
13,
13
],
"number": 2
}
]
],
"paths": [
"true.js",
"true.js"
],
"oids": [
"c1c6922d1dfea3f2e582e55796f6fdf98eaeaad3",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"true.js"
],
"sha1": "087fc0349e3fbaba876282869c1104339ccbd22d",
"gitDir": "test/corpus/repos/javascript",
"sha2": "2969c3538fa44b0b9930417f37b669ad53801cd1"
}]