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

1752 lines
70 KiB
JSON

[{
"testCaseDescription": "javascript-subscript-access-string-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"range": [
2,
15
]
}
],
"range": [
0,
16
]
}
],
"range": [
0,
17
]
}
],
"patch": "insert",
"range": [
0,
18
]
}
],
"hasChanges": true,
"range": [
0,
18
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
18,
18
]
}
],
"hasChanges": true,
"range": [
18,
18
],
"number": 2
}
]
],
"paths": [
"subscript-access-string.js",
"subscript-access-string.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"429371721d335f8f5952d657097e24b250b7812e"
]
},
"filePaths": [
"subscript-access-string.js"
],
"sha1": "903f7ce63da60375028da51f6c99695831d5c9d4",
"gitDir": "test/corpus/repos/javascript",
"sha2": "3f22b497e9b6b998ec932e841e4e8909850c0f83"
}
,{
"testCaseDescription": "javascript-subscript-access-string-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"range": [
2,
21
]
}
],
"range": [
0,
22
]
}
],
"patch": "insert",
"range": [
0,
23
]
}
],
"range": [
0,
24
]
}
],
"hasChanges": true,
"range": [
0,
24
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
24,
25
]
},
{
"category": "StringLiteral",
"range": [
26,
39
]
}
],
"range": [
24,
40
]
}
],
"patch": "insert",
"range": [
24,
41
]
}
],
"range": [
24,
42
]
}
],
"hasChanges": true,
"range": [
24,
42
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"range": [
2,
15
]
}
],
"range": [
0,
16
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"hasChanges": false,
"range": [
0,
18
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "StringLiteral",
"range": [
44,
57
]
}
],
"range": [
42,
58
]
}
],
"range": [
42,
59
]
}
],
"range": [
42,
60
]
}
],
"hasChanges": false,
"range": [
42,
60
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
18,
18
]
}
],
"hasChanges": false,
"range": [
18,
18
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
60,
60
]
}
],
"hasChanges": false,
"range": [
60,
60
],
"number": 4
}
]
],
"paths": [
"subscript-access-string.js",
"subscript-access-string.js"
],
"oids": [
"429371721d335f8f5952d657097e24b250b7812e",
"42930094b4f069ce252e9beed6e58ea153476f18"
]
},
"filePaths": [
"subscript-access-string.js"
],
"sha1": "3f22b497e9b6b998ec932e841e4e8909850c0f83",
"gitDir": "test/corpus/repos/javascript",
"sha2": "adc7e60508c4e5c0ec52b49005a2892e6a20e066"
}
,{
"testCaseDescription": "javascript-subscript-access-string-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
2,
21
]
}
],
"range": [
0,
22
]
}
],
"range": [
0,
23
]
}
],
"range": [
0,
24
]
}
],
"hasChanges": true,
"range": [
0,
24
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
2,
15
]
}
],
"range": [
0,
16
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"hasChanges": true,
"range": [
0,
18
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
24,
25
]
},
{
"category": "StringLiteral",
"range": [
26,
39
]
}
],
"range": [
24,
40
]
}
],
"range": [
24,
41
]
}
],
"range": [
24,
42
]
}
],
"hasChanges": false,
"range": [
24,
42
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
18,
19
]
},
{
"category": "StringLiteral",
"range": [
20,
33
]
}
],
"range": [
18,
34
]
}
],
"range": [
18,
35
]
}
],
"range": [
18,
36
]
}
],
"hasChanges": false,
"range": [
18,
36
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "StringLiteral",
"range": [
44,
57
]
}
],
"range": [
42,
58
]
}
],
"range": [
42,
59
]
}
],
"range": [
42,
60
]
}
],
"hasChanges": false,
"range": [
42,
60
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
36,
37
]
},
{
"category": "StringLiteral",
"range": [
38,
51
]
}
],
"range": [
36,
52
]
}
],
"range": [
36,
53
]
}
],
"range": [
36,
54
]
}
],
"hasChanges": false,
"range": [
36,
54
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
60,
60
]
}
],
"hasChanges": false,
"range": [
60,
60
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
54,
54
]
}
],
"hasChanges": false,
"range": [
54,
54
],
"number": 4
}
]
],
"paths": [
"subscript-access-string.js",
"subscript-access-string.js"
],
"oids": [
"42930094b4f069ce252e9beed6e58ea153476f18",
"c53d07bbc992afb317ee398756c832650830f46d"
]
},
"filePaths": [
"subscript-access-string.js"
],
"sha1": "adc7e60508c4e5c0ec52b49005a2892e6a20e066",
"gitDir": "test/corpus/repos/javascript",
"sha2": "beac8653b6898b100a2fd3d1711e96a38718ad5d"
}
,{
"testCaseDescription": "javascript-subscript-access-string-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
2,
15
]
}
],
"range": [
0,
16
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"hasChanges": true,
"range": [
0,
18
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"patch": "replace",
"range": [
2,
21
]
}
],
"range": [
0,
22
]
}
],
"range": [
0,
23
]
}
],
"range": [
0,
24
]
}
],
"hasChanges": true,
"range": [
0,
24
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
18,
19
]
},
{
"category": "StringLiteral",
"range": [
20,
33
]
}
],
"range": [
18,
34
]
}
],
"range": [
18,
35
]
}
],
"range": [
18,
36
]
}
],
"hasChanges": false,
"range": [
18,
36
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
24,
25
]
},
{
"category": "StringLiteral",
"range": [
26,
39
]
}
],
"range": [
24,
40
]
}
],
"range": [
24,
41
]
}
],
"range": [
24,
42
]
}
],
"hasChanges": false,
"range": [
24,
42
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
36,
37
]
},
{
"category": "StringLiteral",
"range": [
38,
51
]
}
],
"range": [
36,
52
]
}
],
"range": [
36,
53
]
}
],
"range": [
36,
54
]
}
],
"hasChanges": false,
"range": [
36,
54
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "StringLiteral",
"range": [
44,
57
]
}
],
"range": [
42,
58
]
}
],
"range": [
42,
59
]
}
],
"range": [
42,
60
]
}
],
"hasChanges": false,
"range": [
42,
60
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
54,
54
]
}
],
"hasChanges": false,
"range": [
54,
54
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
60,
60
]
}
],
"hasChanges": false,
"range": [
60,
60
],
"number": 4
}
]
],
"paths": [
"subscript-access-string.js",
"subscript-access-string.js"
],
"oids": [
"c53d07bbc992afb317ee398756c832650830f46d",
"42930094b4f069ce252e9beed6e58ea153476f18"
]
},
"filePaths": [
"subscript-access-string.js"
],
"sha1": "beac8653b6898b100a2fd3d1711e96a38718ad5d",
"gitDir": "test/corpus/repos/javascript",
"sha2": "bb42a8b7eb2818d3411783f14beba67fc0e9a17c"
}
,{
"testCaseDescription": "javascript-subscript-access-string-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"range": [
2,
21
]
}
],
"range": [
0,
22
]
}
],
"patch": "delete",
"range": [
0,
23
]
}
],
"range": [
0,
24
]
}
],
"hasChanges": true,
"range": [
0,
24
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
24,
25
]
},
{
"category": "StringLiteral",
"range": [
26,
39
]
}
],
"range": [
24,
40
]
}
],
"patch": "delete",
"range": [
24,
41
]
}
],
"range": [
24,
42
]
}
],
"hasChanges": true,
"range": [
24,
42
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
42,
43
]
},
{
"category": "StringLiteral",
"range": [
44,
57
]
}
],
"range": [
42,
58
]
}
],
"range": [
42,
59
]
}
],
"range": [
42,
60
]
}
],
"hasChanges": false,
"range": [
42,
60
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"range": [
2,
15
]
}
],
"range": [
0,
16
]
}
],
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"hasChanges": false,
"range": [
0,
18
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
18,
19
]
},
{
"category": "StringLiteral",
"range": [
20,
39
]
}
],
"range": [
18,
40
]
}
],
"patch": "insert",
"range": [
18,
41
]
}
],
"range": [
18,
42
]
}
],
"hasChanges": true,
"range": [
18,
42
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
60,
60
]
}
],
"hasChanges": false,
"range": [
60,
60
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
42,
42
]
}
],
"hasChanges": false,
"range": [
42,
42
],
"number": 3
}
]
],
"paths": [
"subscript-access-string.js",
"subscript-access-string.js"
],
"oids": [
"42930094b4f069ce252e9beed6e58ea153476f18",
"89c1bc26de340529ad66f499e608dfe2a4bc889b"
]
},
"filePaths": [
"subscript-access-string.js"
],
"sha1": "bb42a8b7eb2818d3411783f14beba67fc0e9a17c",
"gitDir": "test/corpus/repos/javascript",
"sha2": "cf1e85a2b0e6a33bad792903f1f8ce73341c7b86"
}
,{
"testCaseDescription": "javascript-subscript-access-string-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"range": [
2,
15
]
}
],
"range": [
0,
16
]
}
],
"patch": "delete",
"range": [
0,
17
]
}
],
"range": [
0,
18
]
}
],
"hasChanges": true,
"range": [
0,
18
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
18,
19
]
},
{
"category": "StringLiteral",
"range": [
20,
39
]
}
],
"range": [
18,
40
]
}
],
"range": [
18,
41
]
}
],
"range": [
18,
42
]
}
],
"hasChanges": false,
"range": [
18,
42
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"range": [
2,
21
]
}
],
"range": [
0,
22
]
}
],
"range": [
0,
23
]
}
],
"range": [
0,
24
]
}
],
"hasChanges": false,
"range": [
0,
24
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
42,
42
]
}
],
"hasChanges": false,
"range": [
42,
42
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
24,
24
]
}
],
"hasChanges": false,
"range": [
24,
24
],
"number": 2
}
]
],
"paths": [
"subscript-access-string.js",
"subscript-access-string.js"
],
"oids": [
"89c1bc26de340529ad66f499e608dfe2a4bc889b",
"758f8e70bb0ac4bda738fda6de26837148d6c5fe"
]
},
"filePaths": [
"subscript-access-string.js"
],
"sha1": "cf1e85a2b0e6a33bad792903f1f8ce73341c7b86",
"gitDir": "test/corpus/repos/javascript",
"sha2": "69ebc56a07ec73a37dee0887398ece72aa103a73"
}
,{
"testCaseDescription": "javascript-subscript-access-string-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "SubscriptAccess",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "StringLiteral",
"range": [
2,
21
]
}
],
"range": [
0,
22
]
}
],
"range": [
0,
23
]
}
],
"patch": "delete",
"range": [
0,
24
]
}
],
"hasChanges": true,
"range": [
0,
24
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
24,
24
]
}
],
"hasChanges": true,
"range": [
24,
24
],
"number": 2
}
]
],
"paths": [
"subscript-access-string.js",
"subscript-access-string.js"
],
"oids": [
"758f8e70bb0ac4bda738fda6de26837148d6c5fe",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"subscript-access-string.js"
],
"sha1": "69ebc56a07ec73a37dee0887398ece72aa103a73",
"gitDir": "test/corpus/repos/javascript",
"sha2": "90d41566d5ed6123b5ffa3067ca17add5c1b9465"
}]