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

1752 lines
70 KiB
JSON

[{
"testCaseDescription": "javascript-assignment-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
4,
5
]
}
],
"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": [
"assignment.js",
"assignment.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"6882fe5e9b61219ab73752afdc310b095bfe745d"
]
},
"filePaths": [
"assignment.js"
],
"sha1": "5f2a120184394b59176fb50000d7257832634823",
"gitDir": "test/corpus/repos/javascript",
"sha2": "76e4e5314866d7a2c8ad97fa51bbf7916a466a98"
}
,{
"testCaseDescription": "javascript-assignment-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
4,
5
]
}
],
"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": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
},
{
"category": "NumberLiteral",
"range": [
11,
12
]
}
],
"range": [
7,
12
]
}
],
"patch": "insert",
"range": [
7,
13
]
}
],
"range": [
7,
14
]
}
],
"hasChanges": true,
"range": [
7,
14
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
4,
5
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"hasChanges": false,
"range": [
0,
7
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
14,
15
]
},
{
"category": "NumberLiteral",
"range": [
18,
19
]
}
],
"range": [
14,
19
]
}
],
"range": [
14,
20
]
}
],
"range": [
14,
21
]
}
],
"hasChanges": false,
"range": [
14,
21
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
7,
7
]
}
],
"hasChanges": false,
"range": [
7,
7
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
21,
21
]
}
],
"hasChanges": false,
"range": [
21,
21
],
"number": 4
}
]
],
"paths": [
"assignment.js",
"assignment.js"
],
"oids": [
"6882fe5e9b61219ab73752afdc310b095bfe745d",
"fb4cba44067ebf39e2fd6f2141e6f37a06092835"
]
},
"filePaths": [
"assignment.js"
],
"sha1": "76e4e5314866d7a2c8ad97fa51bbf7916a466a98",
"gitDir": "test/corpus/repos/javascript",
"sha2": "c0f4631aaec446555aff90919aec2512f50eed41"
}
,{
"testCaseDescription": "javascript-assignment-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
4,
5
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"hasChanges": true,
"range": [
0,
7
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
4,
5
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"hasChanges": true,
"range": [
0,
7
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
},
{
"category": "NumberLiteral",
"range": [
11,
12
]
}
],
"range": [
7,
12
]
}
],
"range": [
7,
13
]
}
],
"range": [
7,
14
]
}
],
"hasChanges": false,
"range": [
7,
14
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
},
{
"category": "NumberLiteral",
"range": [
11,
12
]
}
],
"range": [
7,
12
]
}
],
"range": [
7,
13
]
}
],
"range": [
7,
14
]
}
],
"hasChanges": false,
"range": [
7,
14
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
14,
15
]
},
{
"category": "NumberLiteral",
"range": [
18,
19
]
}
],
"range": [
14,
19
]
}
],
"range": [
14,
20
]
}
],
"range": [
14,
21
]
}
],
"hasChanges": false,
"range": [
14,
21
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
14,
15
]
},
{
"category": "NumberLiteral",
"range": [
18,
19
]
}
],
"range": [
14,
19
]
}
],
"range": [
14,
20
]
}
],
"range": [
14,
21
]
}
],
"hasChanges": false,
"range": [
14,
21
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
21,
21
]
}
],
"hasChanges": false,
"range": [
21,
21
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
21,
21
]
}
],
"hasChanges": false,
"range": [
21,
21
],
"number": 4
}
]
],
"paths": [
"assignment.js",
"assignment.js"
],
"oids": [
"fb4cba44067ebf39e2fd6f2141e6f37a06092835",
"42e16c611cdbe3ec9b3bb6a364f3c0f9fb57844f"
]
},
"filePaths": [
"assignment.js"
],
"sha1": "c0f4631aaec446555aff90919aec2512f50eed41",
"gitDir": "test/corpus/repos/javascript",
"sha2": "0e951153d54f3a8426b1c6633458cf2f9d9eef98"
}
,{
"testCaseDescription": "javascript-assignment-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
4,
5
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"hasChanges": true,
"range": [
0,
7
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
4,
5
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"hasChanges": true,
"range": [
0,
7
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
},
{
"category": "NumberLiteral",
"range": [
11,
12
]
}
],
"range": [
7,
12
]
}
],
"range": [
7,
13
]
}
],
"range": [
7,
14
]
}
],
"hasChanges": false,
"range": [
7,
14
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
},
{
"category": "NumberLiteral",
"range": [
11,
12
]
}
],
"range": [
7,
12
]
}
],
"range": [
7,
13
]
}
],
"range": [
7,
14
]
}
],
"hasChanges": false,
"range": [
7,
14
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
14,
15
]
},
{
"category": "NumberLiteral",
"range": [
18,
19
]
}
],
"range": [
14,
19
]
}
],
"range": [
14,
20
]
}
],
"range": [
14,
21
]
}
],
"hasChanges": false,
"range": [
14,
21
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
14,
15
]
},
{
"category": "NumberLiteral",
"range": [
18,
19
]
}
],
"range": [
14,
19
]
}
],
"range": [
14,
20
]
}
],
"range": [
14,
21
]
}
],
"hasChanges": false,
"range": [
14,
21
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
21,
21
]
}
],
"hasChanges": false,
"range": [
21,
21
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
21,
21
]
}
],
"hasChanges": false,
"range": [
21,
21
],
"number": 4
}
]
],
"paths": [
"assignment.js",
"assignment.js"
],
"oids": [
"42e16c611cdbe3ec9b3bb6a364f3c0f9fb57844f",
"fb4cba44067ebf39e2fd6f2141e6f37a06092835"
]
},
"filePaths": [
"assignment.js"
],
"sha1": "0e951153d54f3a8426b1c6633458cf2f9d9eef98",
"gitDir": "test/corpus/repos/javascript",
"sha2": "7b32d5d2ae1dc472d7ffa2916b3f9a761397fb35"
}
,{
"testCaseDescription": "javascript-assignment-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
4,
5
]
}
],
"range": [
0,
5
]
}
],
"patch": "delete",
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"hasChanges": true,
"range": [
0,
7
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
},
{
"category": "NumberLiteral",
"range": [
11,
12
]
}
],
"range": [
7,
12
]
}
],
"patch": "delete",
"range": [
7,
13
]
}
],
"range": [
7,
14
]
}
],
"hasChanges": true,
"range": [
7,
14
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
14,
15
]
},
{
"category": "NumberLiteral",
"range": [
18,
19
]
}
],
"range": [
14,
19
]
}
],
"range": [
14,
20
]
}
],
"range": [
14,
21
]
}
],
"hasChanges": false,
"range": [
14,
21
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
4,
5
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"hasChanges": false,
"range": [
0,
7
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
},
{
"category": "NumberLiteral",
"range": [
11,
12
]
}
],
"range": [
7,
12
]
}
],
"patch": "insert",
"range": [
7,
13
]
}
],
"range": [
7,
14
]
}
],
"hasChanges": true,
"range": [
7,
14
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
21,
21
]
}
],
"hasChanges": false,
"range": [
21,
21
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
14,
14
]
}
],
"hasChanges": false,
"range": [
14,
14
],
"number": 3
}
]
],
"paths": [
"assignment.js",
"assignment.js"
],
"oids": [
"fb4cba44067ebf39e2fd6f2141e6f37a06092835",
"11fe15d7f4c6042ed39993811cb54e0f3cd3ac83"
]
},
"filePaths": [
"assignment.js"
],
"sha1": "7b32d5d2ae1dc472d7ffa2916b3f9a761397fb35",
"gitDir": "test/corpus/repos/javascript",
"sha2": "dd74ca7fe5df43d2d792fd3b438dbc526f464536"
}
,{
"testCaseDescription": "javascript-assignment-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
4,
5
]
}
],
"range": [
0,
5
]
}
],
"patch": "delete",
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"hasChanges": true,
"range": [
0,
7
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
7,
8
]
},
{
"category": "NumberLiteral",
"range": [
11,
12
]
}
],
"range": [
7,
12
]
}
],
"range": [
7,
13
]
}
],
"range": [
7,
14
]
}
],
"hasChanges": false,
"range": [
7,
14
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
4,
5
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"hasChanges": false,
"range": [
0,
7
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
14,
14
]
}
],
"hasChanges": false,
"range": [
14,
14
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
7,
7
]
}
],
"hasChanges": false,
"range": [
7,
7
],
"number": 2
}
]
],
"paths": [
"assignment.js",
"assignment.js"
],
"oids": [
"11fe15d7f4c6042ed39993811cb54e0f3cd3ac83",
"198b8f89e758aee0adce3806353120c3b674937d"
]
},
"filePaths": [
"assignment.js"
],
"sha1": "dd74ca7fe5df43d2d792fd3b438dbc526f464536",
"gitDir": "test/corpus/repos/javascript",
"sha2": "e679de0fb1177e9db60fc984df8f665546868d3a"
}
,{
"testCaseDescription": "javascript-assignment-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
4,
5
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"patch": "delete",
"range": [
0,
7
]
}
],
"hasChanges": true,
"range": [
0,
7
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
7,
7
]
}
],
"hasChanges": true,
"range": [
7,
7
],
"number": 2
}
]
],
"paths": [
"assignment.js",
"assignment.js"
],
"oids": [
"198b8f89e758aee0adce3806353120c3b674937d",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"assignment.js"
],
"sha1": "e679de0fb1177e9db60fc984df8f665546868d3a",
"gitDir": "test/corpus/repos/javascript",
"sha2": "824f1c34e65ebb5b526c2a13d4aed8cd87752a2c"
}]