1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
semantic/test/corpus/json/javascript/identifier.json
2016-11-01 10:03:25 -05:00

1336 lines
46 KiB
JSON

[{
"testCaseDescription": "javascript-identifier-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"patch": "insert",
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
8,
8
]
}
],
"hasChanges": true,
"range": [
8,
8
],
"number": 2
}
]
],
"paths": [
"identifier.js",
"identifier.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"1cf4ad05ef284fd6411546e5ddfb1938c9151cb1"
]
},
"filePaths": [
"identifier.js"
],
"sha1": "d2979340e12fa768bcdeb77fa845b9ae8038ad8f",
"gitDir": "test/corpus/repos/javascript",
"sha2": "b1b16e303372d49cc9c69c32bac7d737208eeadd"
}
,{
"testCaseDescription": "javascript-identifier-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
7
]
}
],
"patch": "insert",
"range": [
0,
8
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
8,
14
]
}
],
"patch": "insert",
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": true,
"range": [
8,
16
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": false,
"range": [
0,
8
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
16,
22
]
}
],
"range": [
16,
23
]
}
],
"range": [
16,
24
]
}
],
"hasChanges": false,
"range": [
16,
24
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
8,
8
]
}
],
"hasChanges": false,
"range": [
8,
8
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
24,
24
]
}
],
"hasChanges": false,
"range": [
24,
24
],
"number": 4
}
]
],
"paths": [
"identifier.js",
"identifier.js"
],
"oids": [
"1cf4ad05ef284fd6411546e5ddfb1938c9151cb1",
"888855ad41100937e0019b87e0a81fb922b040b7"
]
},
"filePaths": [
"identifier.js"
],
"sha1": "b1b16e303372d49cc9c69c32bac7d737208eeadd",
"gitDir": "test/corpus/repos/javascript",
"sha2": "af88add77e44db52f918203ee2b57c36c6818514"
}
,{
"testCaseDescription": "javascript-identifier-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
8,
14
]
}
],
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"range": [
8,
16
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
8,
14
]
}
],
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"range": [
8,
16
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
16,
22
]
}
],
"range": [
16,
23
]
}
],
"range": [
16,
24
]
}
],
"hasChanges": false,
"range": [
16,
24
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
16,
22
]
}
],
"range": [
16,
23
]
}
],
"range": [
16,
24
]
}
],
"hasChanges": false,
"range": [
16,
24
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
24,
24
]
}
],
"hasChanges": false,
"range": [
24,
24
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
24,
24
]
}
],
"hasChanges": false,
"range": [
24,
24
],
"number": 4
}
]
],
"paths": [
"identifier.js",
"identifier.js"
],
"oids": [
"888855ad41100937e0019b87e0a81fb922b040b7",
"60e041c1f5c995232ea415ada7796a8fc59cf50a"
]
},
"filePaths": [
"identifier.js"
],
"sha1": "af88add77e44db52f918203ee2b57c36c6818514",
"gitDir": "test/corpus/repos/javascript",
"sha2": "3857c44ccd6edbd358a0aa019a535bb624c44272"
}
,{
"testCaseDescription": "javascript-identifier-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"patch": "replace",
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
8,
14
]
}
],
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"range": [
8,
16
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
8,
14
]
}
],
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"range": [
8,
16
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
16,
22
]
}
],
"range": [
16,
23
]
}
],
"range": [
16,
24
]
}
],
"hasChanges": false,
"range": [
16,
24
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
16,
22
]
}
],
"range": [
16,
23
]
}
],
"range": [
16,
24
]
}
],
"hasChanges": false,
"range": [
16,
24
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
24,
24
]
}
],
"hasChanges": false,
"range": [
24,
24
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
24,
24
]
}
],
"hasChanges": false,
"range": [
24,
24
],
"number": 4
}
]
],
"paths": [
"identifier.js",
"identifier.js"
],
"oids": [
"60e041c1f5c995232ea415ada7796a8fc59cf50a",
"888855ad41100937e0019b87e0a81fb922b040b7"
]
},
"filePaths": [
"identifier.js"
],
"sha1": "3857c44ccd6edbd358a0aa019a535bb624c44272",
"gitDir": "test/corpus/repos/javascript",
"sha2": "50310a140336ac3eae25fa8c8fc72b0836efdca7"
}
,{
"testCaseDescription": "javascript-identifier-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
7
]
}
],
"patch": "delete",
"range": [
0,
8
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
8,
14
]
}
],
"patch": "delete",
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": true,
"range": [
8,
16
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
16,
22
]
}
],
"range": [
16,
23
]
}
],
"range": [
16,
24
]
}
],
"hasChanges": false,
"range": [
16,
24
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": false,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
8,
15
]
}
],
"patch": "insert",
"range": [
8,
16
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": true,
"range": [
8,
16
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
24,
24
]
}
],
"hasChanges": false,
"range": [
24,
24
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
16,
16
]
}
],
"hasChanges": false,
"range": [
16,
16
],
"number": 3
}
]
],
"paths": [
"identifier.js",
"identifier.js"
],
"oids": [
"888855ad41100937e0019b87e0a81fb922b040b7",
"fbc7b28e28030a5474633484e56cfb97fbba5102"
]
},
"filePaths": [
"identifier.js"
],
"sha1": "50310a140336ac3eae25fa8c8fc72b0836efdca7",
"gitDir": "test/corpus/repos/javascript",
"sha2": "25b3791cf8cbabaaa298e6865aeb34e14f45a68c"
}
,{
"testCaseDescription": "javascript-identifier-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
6
]
}
],
"patch": "delete",
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"range": [
8,
16
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": false,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
16,
16
]
}
],
"hasChanges": false,
"range": [
16,
16
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
8,
8
]
}
],
"hasChanges": false,
"range": [
8,
8
],
"number": 2
}
]
],
"paths": [
"identifier.js",
"identifier.js"
],
"oids": [
"fbc7b28e28030a5474633484e56cfb97fbba5102",
"7276d95d4675eba989693d641b606c19e5c1e6ba"
]
},
"filePaths": [
"identifier.js"
],
"sha1": "25b3791cf8cbabaaa298e6865aeb34e14f45a68c",
"gitDir": "test/corpus/repos/javascript",
"sha2": "d8c156c411cb032cd5e1c78a7cf3b069e4a0911f"
}
,{
"testCaseDescription": "javascript-identifier-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"patch": "delete",
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
8,
8
]
}
],
"hasChanges": true,
"range": [
8,
8
],
"number": 2
}
]
],
"paths": [
"identifier.js",
"identifier.js"
],
"oids": [
"7276d95d4675eba989693d641b606c19e5c1e6ba",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"identifier.js"
],
"sha1": "d8c156c411cb032cd5e1c78a7cf3b069e4a0911f",
"gitDir": "test/corpus/repos/javascript",
"sha2": "60365d7f84b17537d9021c073c945e9231d93e3c"
}]