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

1752 lines
70 KiB
JSON

[{
"testCaseDescription": "javascript-math-assignment-operator-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
5,
6
]
}
],
"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": [
"math-assignment-operator.js",
"math-assignment-operator.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"7150d6e7aaaa31b485dad53b7938765558a5ef7b"
]
},
"filePaths": [
"math-assignment-operator.js"
],
"sha1": "71f81ec7bab5350490d3ff7f2444799df17938ba",
"gitDir": "test/corpus/repos/javascript",
"sha2": "e1fcc6e84011e22cd17ffedaf313bd5fe8f96701"
}
,{
"testCaseDescription": "javascript-math-assignment-operator-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
5,
6
]
}
],
"range": [
0,
6
]
}
],
"patch": "insert",
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
}
],
"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": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
5,
6
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": false,
"range": [
0,
8
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "NumberLiteral",
"range": [
21,
22
]
}
],
"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": [
"math-assignment-operator.js",
"math-assignment-operator.js"
],
"oids": [
"7150d6e7aaaa31b485dad53b7938765558a5ef7b",
"0bf97e75fb39f981fc1b59bbf98a59d49b6ac9d6"
]
},
"filePaths": [
"math-assignment-operator.js"
],
"sha1": "e1fcc6e84011e22cd17ffedaf313bd5fe8f96701",
"gitDir": "test/corpus/repos/javascript",
"sha2": "ad2641c99ae3cb2ddf8eec508ac21b917f0c2dee"
}
,{
"testCaseDescription": "javascript-math-assignment-operator-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
5,
6
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
5,
6
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
}
],
"range": [
8,
14
]
}
],
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"range": [
8,
16
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
}
],
"range": [
8,
14
]
}
],
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"range": [
8,
16
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "NumberLiteral",
"range": [
21,
22
]
}
],
"range": [
16,
22
]
}
],
"range": [
16,
23
]
}
],
"range": [
16,
24
]
}
],
"hasChanges": false,
"range": [
16,
24
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "NumberLiteral",
"range": [
21,
22
]
}
],
"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": [
"math-assignment-operator.js",
"math-assignment-operator.js"
],
"oids": [
"0bf97e75fb39f981fc1b59bbf98a59d49b6ac9d6",
"ad04937aee456c0697e6e26b9172bb3f951d187f"
]
},
"filePaths": [
"math-assignment-operator.js"
],
"sha1": "ad2641c99ae3cb2ddf8eec508ac21b917f0c2dee",
"gitDir": "test/corpus/repos/javascript",
"sha2": "d141c1857e9c0c7fd467b25c2de1796ae2f3bd83"
}
,{
"testCaseDescription": "javascript-math-assignment-operator-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
5,
6
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
5,
6
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": true,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
}
],
"range": [
8,
14
]
}
],
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"range": [
8,
16
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
}
],
"range": [
8,
14
]
}
],
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"range": [
8,
16
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "NumberLiteral",
"range": [
21,
22
]
}
],
"range": [
16,
22
]
}
],
"range": [
16,
23
]
}
],
"range": [
16,
24
]
}
],
"hasChanges": false,
"range": [
16,
24
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "NumberLiteral",
"range": [
21,
22
]
}
],
"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": [
"math-assignment-operator.js",
"math-assignment-operator.js"
],
"oids": [
"ad04937aee456c0697e6e26b9172bb3f951d187f",
"0bf97e75fb39f981fc1b59bbf98a59d49b6ac9d6"
]
},
"filePaths": [
"math-assignment-operator.js"
],
"sha1": "d141c1857e9c0c7fd467b25c2de1796ae2f3bd83",
"gitDir": "test/corpus/repos/javascript",
"sha2": "22bc438d17c00f0616cd58900a50390d90a928f5"
}
,{
"testCaseDescription": "javascript-math-assignment-operator-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
5,
6
]
}
],
"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": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
}
],
"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": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "NumberLiteral",
"range": [
21,
22
]
}
],
"range": [
16,
22
]
}
],
"range": [
16,
23
]
}
],
"range": [
16,
24
]
}
],
"hasChanges": false,
"range": [
16,
24
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
5,
6
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"range": [
0,
8
]
}
],
"hasChanges": false,
"range": [
0,
8
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
}
],
"range": [
8,
14
]
}
],
"patch": "insert",
"range": [
8,
15
]
}
],
"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": [
"math-assignment-operator.js",
"math-assignment-operator.js"
],
"oids": [
"0bf97e75fb39f981fc1b59bbf98a59d49b6ac9d6",
"71275450ce8eab1ec02ce012fe725a62327af0ef"
]
},
"filePaths": [
"math-assignment-operator.js"
],
"sha1": "22bc438d17c00f0616cd58900a50390d90a928f5",
"gitDir": "test/corpus/repos/javascript",
"sha2": "fa10fe52dc2d0ecf740ac756b526c4174c1cf160"
}
,{
"testCaseDescription": "javascript-math-assignment-operator-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
5,
6
]
}
],
"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": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "NumberLiteral",
"range": [
13,
14
]
}
],
"range": [
8,
14
]
}
],
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"range": [
8,
16
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
5,
6
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"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": [
"math-assignment-operator.js",
"math-assignment-operator.js"
],
"oids": [
"71275450ce8eab1ec02ce012fe725a62327af0ef",
"94d1472273d5e1435104388d3ffb1a3465112096"
]
},
"filePaths": [
"math-assignment-operator.js"
],
"sha1": "fa10fe52dc2d0ecf740ac756b526c4174c1cf160",
"gitDir": "test/corpus/repos/javascript",
"sha2": "ac44e36dfe0afdaed22058f4cbd8afab7838db7d"
}
,{
"testCaseDescription": "javascript-math-assignment-operator-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "MathAssignment",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "NumberLiteral",
"range": [
5,
6
]
}
],
"range": [
0,
6
]
}
],
"range": [
0,
7
]
}
],
"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": [
"math-assignment-operator.js",
"math-assignment-operator.js"
],
"oids": [
"94d1472273d5e1435104388d3ffb1a3465112096",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"math-assignment-operator.js"
],
"sha1": "ac44e36dfe0afdaed22058f4cbd8afab7838db7d",
"gitDir": "test/corpus/repos/javascript",
"sha2": "8f8309aab5b170620dd56a95dde3a0a1c4307c68"
}]