1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
semantic/test/corpus/json/javascript/variable.json

1336 lines
46 KiB
JSON
Raw Normal View History

[{
"testCaseDescription": "javascript-variable-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": [
"variable.js",
"variable.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"1cf4ad05ef284fd6411546e5ddfb1938c9151cb1"
]
},
"filePaths": [
"variable.js"
],
"sha1": "fc9b2f0c3bbc1743da1d9f7c05b00dce579743dc",
"gitDir": "test/corpus/repos/javascript",
"sha2": "743e919f5e47aee15e99fb1253761ba85c11fe6a"
}
,{
"testCaseDescription": "javascript-variable-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": [
"variable.js",
"variable.js"
],
"oids": [
"1cf4ad05ef284fd6411546e5ddfb1938c9151cb1",
"888855ad41100937e0019b87e0a81fb922b040b7"
]
},
"filePaths": [
"variable.js"
],
"sha1": "743e919f5e47aee15e99fb1253761ba85c11fe6a",
"gitDir": "test/corpus/repos/javascript",
"sha2": "d2080f5440eb73d2825438502db8980c8cbd1df9"
}
,{
"testCaseDescription": "javascript-variable-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": [
"variable.js",
"variable.js"
],
"oids": [
"888855ad41100937e0019b87e0a81fb922b040b7",
"60e041c1f5c995232ea415ada7796a8fc59cf50a"
]
},
"filePaths": [
"variable.js"
],
"sha1": "d2080f5440eb73d2825438502db8980c8cbd1df9",
"gitDir": "test/corpus/repos/javascript",
"sha2": "70aea979cee3ebc094d51abb4e173eb1d1af4050"
}
,{
"testCaseDescription": "javascript-variable-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": [
"variable.js",
"variable.js"
],
"oids": [
"60e041c1f5c995232ea415ada7796a8fc59cf50a",
"888855ad41100937e0019b87e0a81fb922b040b7"
]
},
"filePaths": [
"variable.js"
],
"sha1": "70aea979cee3ebc094d51abb4e173eb1d1af4050",
"gitDir": "test/corpus/repos/javascript",
"sha2": "643423b4dc71e15d75b80071f756f608998cdf58"
}
,{
"testCaseDescription": "javascript-variable-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": [
"variable.js",
"variable.js"
],
"oids": [
"888855ad41100937e0019b87e0a81fb922b040b7",
"fbc7b28e28030a5474633484e56cfb97fbba5102"
]
},
"filePaths": [
"variable.js"
],
"sha1": "643423b4dc71e15d75b80071f756f608998cdf58",
"gitDir": "test/corpus/repos/javascript",
"sha2": "e53e6db231bb1f8459397a9fd843c106e4d71856"
}
,{
"testCaseDescription": "javascript-variable-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": [
"variable.js",
"variable.js"
],
"oids": [
"fbc7b28e28030a5474633484e56cfb97fbba5102",
"7276d95d4675eba989693d641b606c19e5c1e6ba"
]
},
"filePaths": [
"variable.js"
],
"sha1": "e53e6db231bb1f8459397a9fd843c106e4d71856",
"gitDir": "test/corpus/repos/javascript",
"sha2": "61bf73809ef6736679d7c9424501710dc1bdadad"
}
,{
"testCaseDescription": "javascript-variable-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": [
"variable.js",
"variable.js"
],
"oids": [
"7276d95d4675eba989693d641b606c19e5c1e6ba",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"variable.js"
],
"sha1": "61bf73809ef6736679d7c9424501710dc1bdadad",
"gitDir": "test/corpus/repos/javascript",
"sha2": "81080589255cbb551f9a84c4691635b5fd543c2e"
}]