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

2168 lines
97 KiB
JSON

[{
"testCaseDescription": "javascript-member-access-assignment-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"patch": "insert",
"range": [
0,
9
]
}
],
"hasChanges": true,
"range": [
0,
9
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
9,
9
]
}
],
"hasChanges": true,
"range": [
9,
9
],
"number": 2
}
]
],
"paths": [
"member-access-assignment.js",
"member-access-assignment.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"7a99e3099456e71f6d44eae1634a02873cf08445"
]
},
"filePaths": [
"member-access-assignment.js"
],
"sha1": "824f1c34e65ebb5b526c2a13d4aed8cd87752a2c",
"gitDir": "test/corpus/repos/javascript",
"sha2": "22a3527e0bf145d693bb3faf2c6c3314a2e6251a"
}
,{
"testCaseDescription": "javascript-member-access-assignment-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"patch": "insert",
"range": [
0,
8
]
}
],
"range": [
0,
9
]
}
],
"hasChanges": true,
"range": [
0,
9
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
9,
10
]
},
{
"category": "Identifier",
"range": [
11,
12
]
}
],
"range": [
9,
12
]
},
{
"category": "NumberLiteral",
"range": [
15,
16
]
}
],
"range": [
9,
16
]
}
],
"patch": "insert",
"range": [
9,
17
]
}
],
"range": [
9,
18
]
}
],
"hasChanges": true,
"range": [
9,
18
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"range": [
0,
9
]
}
],
"hasChanges": false,
"range": [
0,
9
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
18,
19
]
},
{
"category": "Identifier",
"range": [
20,
21
]
}
],
"range": [
18,
21
]
},
{
"category": "NumberLiteral",
"range": [
24,
25
]
}
],
"range": [
18,
25
]
}
],
"range": [
18,
26
]
}
],
"range": [
18,
27
]
}
],
"hasChanges": false,
"range": [
18,
27
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
9,
9
]
}
],
"hasChanges": false,
"range": [
9,
9
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
27,
27
]
}
],
"hasChanges": false,
"range": [
27,
27
],
"number": 4
}
]
],
"paths": [
"member-access-assignment.js",
"member-access-assignment.js"
],
"oids": [
"7a99e3099456e71f6d44eae1634a02873cf08445",
"32040068931708fb0b9512d6957fc4b1eb61238c"
]
},
"filePaths": [
"member-access-assignment.js"
],
"sha1": "22a3527e0bf145d693bb3faf2c6c3314a2e6251a",
"gitDir": "test/corpus/repos/javascript",
"sha2": "4c5ae4b1337c8ad2ced8b247728b74c4ae90a1e7"
}
,{
"testCaseDescription": "javascript-member-access-assignment-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"range": [
0,
9
]
}
],
"hasChanges": true,
"range": [
0,
9
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"range": [
0,
9
]
}
],
"hasChanges": true,
"range": [
0,
9
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
9,
10
]
},
{
"category": "Identifier",
"range": [
11,
12
]
}
],
"range": [
9,
12
]
},
{
"category": "NumberLiteral",
"range": [
15,
16
]
}
],
"range": [
9,
16
]
}
],
"range": [
9,
17
]
}
],
"range": [
9,
18
]
}
],
"hasChanges": false,
"range": [
9,
18
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
9,
10
]
},
{
"category": "Identifier",
"range": [
11,
12
]
}
],
"range": [
9,
12
]
},
{
"category": "NumberLiteral",
"range": [
15,
16
]
}
],
"range": [
9,
16
]
}
],
"range": [
9,
17
]
}
],
"range": [
9,
18
]
}
],
"hasChanges": false,
"range": [
9,
18
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
18,
19
]
},
{
"category": "Identifier",
"range": [
20,
21
]
}
],
"range": [
18,
21
]
},
{
"category": "NumberLiteral",
"range": [
24,
25
]
}
],
"range": [
18,
25
]
}
],
"range": [
18,
26
]
}
],
"range": [
18,
27
]
}
],
"hasChanges": false,
"range": [
18,
27
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
18,
19
]
},
{
"category": "Identifier",
"range": [
20,
21
]
}
],
"range": [
18,
21
]
},
{
"category": "NumberLiteral",
"range": [
24,
25
]
}
],
"range": [
18,
25
]
}
],
"range": [
18,
26
]
}
],
"range": [
18,
27
]
}
],
"hasChanges": false,
"range": [
18,
27
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
27,
27
]
}
],
"hasChanges": false,
"range": [
27,
27
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
27,
27
]
}
],
"hasChanges": false,
"range": [
27,
27
],
"number": 4
}
]
],
"paths": [
"member-access-assignment.js",
"member-access-assignment.js"
],
"oids": [
"32040068931708fb0b9512d6957fc4b1eb61238c",
"94893a32f203ac706838c159344b8ab9085db17d"
]
},
"filePaths": [
"member-access-assignment.js"
],
"sha1": "4c5ae4b1337c8ad2ced8b247728b74c4ae90a1e7",
"gitDir": "test/corpus/repos/javascript",
"sha2": "50827ec6f63fe9142b9949c3bdcb4dfcbf04a73f"
}
,{
"testCaseDescription": "javascript-member-access-assignment-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"range": [
0,
9
]
}
],
"hasChanges": true,
"range": [
0,
9
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"range": [
0,
9
]
}
],
"hasChanges": true,
"range": [
0,
9
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
9,
10
]
},
{
"category": "Identifier",
"range": [
11,
12
]
}
],
"range": [
9,
12
]
},
{
"category": "NumberLiteral",
"range": [
15,
16
]
}
],
"range": [
9,
16
]
}
],
"range": [
9,
17
]
}
],
"range": [
9,
18
]
}
],
"hasChanges": false,
"range": [
9,
18
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
9,
10
]
},
{
"category": "Identifier",
"range": [
11,
12
]
}
],
"range": [
9,
12
]
},
{
"category": "NumberLiteral",
"range": [
15,
16
]
}
],
"range": [
9,
16
]
}
],
"range": [
9,
17
]
}
],
"range": [
9,
18
]
}
],
"hasChanges": false,
"range": [
9,
18
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
18,
19
]
},
{
"category": "Identifier",
"range": [
20,
21
]
}
],
"range": [
18,
21
]
},
{
"category": "NumberLiteral",
"range": [
24,
25
]
}
],
"range": [
18,
25
]
}
],
"range": [
18,
26
]
}
],
"range": [
18,
27
]
}
],
"hasChanges": false,
"range": [
18,
27
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
18,
19
]
},
{
"category": "Identifier",
"range": [
20,
21
]
}
],
"range": [
18,
21
]
},
{
"category": "NumberLiteral",
"range": [
24,
25
]
}
],
"range": [
18,
25
]
}
],
"range": [
18,
26
]
}
],
"range": [
18,
27
]
}
],
"hasChanges": false,
"range": [
18,
27
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
27,
27
]
}
],
"hasChanges": false,
"range": [
27,
27
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
27,
27
]
}
],
"hasChanges": false,
"range": [
27,
27
],
"number": 4
}
]
],
"paths": [
"member-access-assignment.js",
"member-access-assignment.js"
],
"oids": [
"94893a32f203ac706838c159344b8ab9085db17d",
"32040068931708fb0b9512d6957fc4b1eb61238c"
]
},
"filePaths": [
"member-access-assignment.js"
],
"sha1": "50827ec6f63fe9142b9949c3bdcb4dfcbf04a73f",
"gitDir": "test/corpus/repos/javascript",
"sha2": "c4433466262423a931a4b626e48090fbca08e897"
}
,{
"testCaseDescription": "javascript-member-access-assignment-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"patch": "delete",
"range": [
0,
8
]
}
],
"range": [
0,
9
]
}
],
"hasChanges": true,
"range": [
0,
9
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
9,
10
]
},
{
"category": "Identifier",
"range": [
11,
12
]
}
],
"range": [
9,
12
]
},
{
"category": "NumberLiteral",
"range": [
15,
16
]
}
],
"range": [
9,
16
]
}
],
"patch": "delete",
"range": [
9,
17
]
}
],
"range": [
9,
18
]
}
],
"hasChanges": true,
"range": [
9,
18
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
18,
19
]
},
{
"category": "Identifier",
"range": [
20,
21
]
}
],
"range": [
18,
21
]
},
{
"category": "NumberLiteral",
"range": [
24,
25
]
}
],
"range": [
18,
25
]
}
],
"range": [
18,
26
]
}
],
"range": [
18,
27
]
}
],
"hasChanges": false,
"range": [
18,
27
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"range": [
0,
9
]
}
],
"hasChanges": false,
"range": [
0,
9
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
9,
10
]
},
{
"category": "Identifier",
"range": [
11,
12
]
}
],
"range": [
9,
12
]
},
{
"category": "NumberLiteral",
"range": [
15,
16
]
}
],
"range": [
9,
16
]
}
],
"patch": "insert",
"range": [
9,
17
]
}
],
"range": [
9,
18
]
}
],
"hasChanges": true,
"range": [
9,
18
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
27,
27
]
}
],
"hasChanges": false,
"range": [
27,
27
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
18,
18
]
}
],
"hasChanges": false,
"range": [
18,
18
],
"number": 3
}
]
],
"paths": [
"member-access-assignment.js",
"member-access-assignment.js"
],
"oids": [
"32040068931708fb0b9512d6957fc4b1eb61238c",
"8d78a24f4a6b385148718b33a24742123a8c413a"
]
},
"filePaths": [
"member-access-assignment.js"
],
"sha1": "c4433466262423a931a4b626e48090fbca08e897",
"gitDir": "test/corpus/repos/javascript",
"sha2": "4750e4b8a18d4dd2afb25321e8d51ab097c6a8d7"
}
,{
"testCaseDescription": "javascript-member-access-assignment-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"patch": "delete",
"range": [
0,
8
]
}
],
"range": [
0,
9
]
}
],
"hasChanges": true,
"range": [
0,
9
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
9,
10
]
},
{
"category": "Identifier",
"range": [
11,
12
]
}
],
"range": [
9,
12
]
},
{
"category": "NumberLiteral",
"range": [
15,
16
]
}
],
"range": [
9,
16
]
}
],
"range": [
9,
17
]
}
],
"range": [
9,
18
]
}
],
"hasChanges": false,
"range": [
9,
18
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"range": [
0,
9
]
}
],
"hasChanges": false,
"range": [
0,
9
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
18,
18
]
}
],
"hasChanges": false,
"range": [
18,
18
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
9,
9
]
}
],
"hasChanges": false,
"range": [
9,
9
],
"number": 2
}
]
],
"paths": [
"member-access-assignment.js",
"member-access-assignment.js"
],
"oids": [
"8d78a24f4a6b385148718b33a24742123a8c413a",
"799018d077c34569268d97d29864cda54c49aa23"
]
},
"filePaths": [
"member-access-assignment.js"
],
"sha1": "4750e4b8a18d4dd2afb25321e8d51ab097c6a8d7",
"gitDir": "test/corpus/repos/javascript",
"sha2": "d2b5766d5a7d3b6a58865000dc26b57207c5425e"
}
,{
"testCaseDescription": "javascript-member-access-assignment-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Assignment",
"children": [
{
"category": "MemberAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"range": [
2,
3
]
}
],
"range": [
0,
3
]
},
{
"category": "NumberLiteral",
"range": [
6,
7
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"patch": "delete",
"range": [
0,
9
]
}
],
"hasChanges": true,
"range": [
0,
9
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
9,
9
]
}
],
"hasChanges": true,
"range": [
9,
9
],
"number": 2
}
]
],
"paths": [
"member-access-assignment.js",
"member-access-assignment.js"
],
"oids": [
"799018d077c34569268d97d29864cda54c49aa23",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"member-access-assignment.js"
],
"sha1": "d2b5766d5a7d3b6a58865000dc26b57207c5425e",
"gitDir": "test/corpus/repos/javascript",
"sha2": "d0198df46c650454f3a881a6d7986a95080562ce"
}]