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

1744 lines
70 KiB
JSON

[{
"testCaseDescription": "javascript-boolean-operator-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": [
"boolean-operator.js",
"boolean-operator.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"7280a98cdd0353c1bb7e03770613ae709bcb2cf5"
]
},
"filePaths": [
"boolean-operator.js"
],
"sha1": "8a3763870919ad50fb09b1dc898ad9c4db4e43d2",
"gitDir": "test/corpus/repos/javascript",
"sha2": "d6ef9e55cd0ca82e5e243c7c079c8a3f927f6a69"
}
,{
"testCaseDescription": "javascript-boolean-operator-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "Identifier",
"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": [
"boolean-operator.js",
"boolean-operator.js"
],
"oids": [
"7280a98cdd0353c1bb7e03770613ae709bcb2cf5",
"fe3f30646b4683f9a0bf94b7464d5dd0a9b216d5"
]
},
"filePaths": [
"boolean-operator.js"
],
"sha1": "d6ef9e55cd0ca82e5e243c7c079c8a3f927f6a69",
"gitDir": "test/corpus/repos/javascript",
"sha2": "0f713727bef7fa9c8a1445858fb9dd6ee2efb465"
}
,{
"testCaseDescription": "javascript-boolean-operator-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "Identifier",
"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": [
"boolean-operator.js",
"boolean-operator.js"
],
"oids": [
"fe3f30646b4683f9a0bf94b7464d5dd0a9b216d5",
"273c0ee8f4c5684f46f62e9bc61a9b937fd42da6"
]
},
"filePaths": [
"boolean-operator.js"
],
"sha1": "0f713727bef7fa9c8a1445858fb9dd6ee2efb465",
"gitDir": "test/corpus/repos/javascript",
"sha2": "a715a50ed40d0d70cba345eef4351d0ba337fad4"
}
,{
"testCaseDescription": "javascript-boolean-operator-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "Identifier",
"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": [
"boolean-operator.js",
"boolean-operator.js"
],
"oids": [
"273c0ee8f4c5684f46f62e9bc61a9b937fd42da6",
"fe3f30646b4683f9a0bf94b7464d5dd0a9b216d5"
]
},
"filePaths": [
"boolean-operator.js"
],
"sha1": "a715a50ed40d0d70cba345eef4351d0ba337fad4",
"gitDir": "test/corpus/repos/javascript",
"sha2": "5fa1949ae68c5e918148a59e1f1115d408af3907"
}
,{
"testCaseDescription": "javascript-boolean-operator-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
16,
17
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "Identifier",
"range": [
13,
14
]
}
],
"range": [
8,
14
]
}
],
"range": [
8,
15
]
}
],
"range": [
8,
16
]
}
],
"hasChanges": false,
"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": [
"boolean-operator.js",
"boolean-operator.js"
],
"oids": [
"fe3f30646b4683f9a0bf94b7464d5dd0a9b216d5",
"7f4873c126dd7633b40d7d706254e05fdf4fa703"
]
},
"filePaths": [
"boolean-operator.js"
],
"sha1": "5fa1949ae68c5e918148a59e1f1115d408af3907",
"gitDir": "test/corpus/repos/javascript",
"sha2": "15d9a493c5fd323160456b26b45662fa5b2c7c55"
}
,{
"testCaseDescription": "javascript-boolean-operator-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
8,
9
]
},
{
"category": "Identifier",
"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": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": [
"boolean-operator.js",
"boolean-operator.js"
],
"oids": [
"7f4873c126dd7633b40d7d706254e05fdf4fa703",
"c6921d12a6f183c99b1d8107b16f6f428d133af8"
]
},
"filePaths": [
"boolean-operator.js"
],
"sha1": "15d9a493c5fd323160456b26b45662fa5b2c7c55",
"gitDir": "test/corpus/repos/javascript",
"sha2": "84db28bc3a34da2b94bc230e77f810cad43046f6"
}
,{
"testCaseDescription": "javascript-boolean-operator-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "BooleanOperator",
"children": [
{
"category": "Identifier",
"range": [
0,
1
]
},
{
"category": "Identifier",
"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": [
"boolean-operator.js",
"boolean-operator.js"
],
"oids": [
"c6921d12a6f183c99b1d8107b16f6f428d133af8",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"boolean-operator.js"
],
"sha1": "84db28bc3a34da2b94bc230e77f810cad43046f6",
"gitDir": "test/corpus/repos/javascript",
"sha2": "e23ff37b936a2a232124e8b7a1c88ab99acfc4f6"
}]