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

1340 lines
46 KiB
JSON

[{
"testCaseDescription": "javascript-this-expression-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"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": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"b251f26b7af5fd0c9cbea299b7e4168fd73781f5"
]
},
"filePaths": [
"this-expression.js"
],
"sha1": "60365d7f84b17537d9021c073c945e9231d93e3c",
"gitDir": "test/corpus/repos/javascript",
"sha2": "b41ad4341c435d24d4ba3663d68b81859c8a687e"
}
,{
"testCaseDescription": "javascript-this-expression-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"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": "Identifier",
"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": "Identifier",
"range": [
0,
4
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": false,
"range": [
0,
6
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"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": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"b251f26b7af5fd0c9cbea299b7e4168fd73781f5",
"5804743758fd3bd2f40d0cc9a3af06f11fc16d3f"
]
},
"filePaths": [
"this-expression.js"
],
"sha1": "b41ad4341c435d24d4ba3663d68b81859c8a687e",
"gitDir": "test/corpus/repos/javascript",
"sha2": "7f60778d783e48f6cdc05bc270c43e8936e7472d"
}
,{
"testCaseDescription": "javascript-this-expression-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"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": "Identifier",
"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": "Identifier",
"range": [
13,
17
]
}
],
"range": [
13,
18
]
}
],
"range": [
13,
19
]
}
],
"hasChanges": false,
"range": [
13,
19
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
6,
10
]
}
],
"range": [
6,
11
]
}
],
"range": [
6,
12
]
}
],
"hasChanges": false,
"range": [
6,
12
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
19,
23
]
}
],
"range": [
19,
24
]
}
],
"range": [
19,
25
]
}
],
"hasChanges": false,
"range": [
19,
25
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"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": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"5804743758fd3bd2f40d0cc9a3af06f11fc16d3f",
"3c82a23c6c601113ba072922e75dcd892e7629ba"
]
},
"filePaths": [
"this-expression.js"
],
"sha1": "7f60778d783e48f6cdc05bc270c43e8936e7472d",
"gitDir": "test/corpus/repos/javascript",
"sha2": "72aac72258c86b8f942d3d0bcea09bb125ac8968"
}
,{
"testCaseDescription": "javascript-this-expression-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"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": "Identifier",
"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": "Identifier",
"range": [
6,
10
]
}
],
"range": [
6,
11
]
}
],
"range": [
6,
12
]
}
],
"hasChanges": false,
"range": [
6,
12
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
13,
17
]
}
],
"range": [
13,
18
]
}
],
"range": [
13,
19
]
}
],
"hasChanges": false,
"range": [
13,
19
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
12,
16
]
}
],
"range": [
12,
17
]
}
],
"range": [
12,
18
]
}
],
"hasChanges": false,
"range": [
12,
18
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"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": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"3c82a23c6c601113ba072922e75dcd892e7629ba",
"5804743758fd3bd2f40d0cc9a3af06f11fc16d3f"
]
},
"filePaths": [
"this-expression.js"
],
"sha1": "72aac72258c86b8f942d3d0bcea09bb125ac8968",
"gitDir": "test/corpus/repos/javascript",
"sha2": "f9e1fd783ff24a926baac3e5ee1a69ab48ba7c03"
}
,{
"testCaseDescription": "javascript-this-expression-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"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": "Identifier",
"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": "Identifier",
"range": [
19,
23
]
}
],
"range": [
19,
24
]
}
],
"range": [
19,
25
]
}
],
"hasChanges": false,
"range": [
19,
25
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": false,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"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": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"5804743758fd3bd2f40d0cc9a3af06f11fc16d3f",
"81aca892150aad969f6b99ea13aeadfc41c94abf"
]
},
"filePaths": [
"this-expression.js"
],
"sha1": "f9e1fd783ff24a926baac3e5ee1a69ab48ba7c03",
"gitDir": "test/corpus/repos/javascript",
"sha2": "e6470a7a99aa4344dfe85baa8df3aa8b51ecf44e"
}
,{
"testCaseDescription": "javascript-this-expression-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"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": "Identifier",
"range": [
13,
17
]
}
],
"range": [
6,
18
]
}
],
"range": [
6,
19
]
}
],
"hasChanges": false,
"range": [
6,
19
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"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": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"81aca892150aad969f6b99ea13aeadfc41c94abf",
"45c3231bf8add38010a596322993d0b138d1b1b2"
]
},
"filePaths": [
"this-expression.js"
],
"sha1": "e6470a7a99aa4344dfe85baa8df3aa8b51ecf44e",
"gitDir": "test/corpus/repos/javascript",
"sha2": "a2e44410309ade750f5371c6df623c9b0b2146a2"
}
,{
"testCaseDescription": "javascript-this-expression-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"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": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"45c3231bf8add38010a596322993d0b138d1b1b2",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"this-expression.js"
],
"sha1": "a2e44410309ade750f5371c6df623c9b0b2146a2",
"gitDir": "test/corpus/repos/javascript",
"sha2": "10e72b7da056ba074da6e4537f591652479ba550"
}]