1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/json/javascript/string.json

1336 lines
46 KiB
JSON
Raw Normal View History

[{
"testCaseDescription": "javascript-string-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
0,
31
]
}
],
"range": [
0,
32
]
}
],
"patch": "insert",
"range": [
0,
33
]
}
],
"hasChanges": true,
"range": [
0,
33
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
33,
33
]
}
],
"hasChanges": true,
"range": [
33,
33
],
"number": 2
}
]
],
"paths": [
"string.js",
"string.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"ea5bd4251f8205df1cae5ad619f03d5678c1dd27"
]
},
"filePaths": [
"string.js"
],
"sha1": "954f6de645b21a3305ee051f7baf71d6c2d28f00",
"gitDir": "test/corpus/repos/javascript",
"sha2": "2ec6001dd34498939531427aa22e78fa0afb91dd"
}
,{
"testCaseDescription": "javascript-string-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
0,
41
]
}
],
"patch": "insert",
"range": [
0,
42
]
}
],
"range": [
0,
43
]
}
],
"hasChanges": true,
"range": [
0,
43
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
43,
74
]
}
],
"patch": "insert",
"range": [
43,
75
]
}
],
"range": [
43,
76
]
}
],
"hasChanges": true,
"range": [
43,
76
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
0,
31
]
}
],
"range": [
0,
32
]
}
],
"range": [
0,
33
]
}
],
"hasChanges": false,
"range": [
0,
33
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
76,
107
]
}
],
"range": [
76,
108
]
}
],
"range": [
76,
109
]
}
],
"hasChanges": false,
"range": [
76,
109
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
33,
33
]
}
],
"hasChanges": false,
"range": [
33,
33
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
109,
109
]
}
],
"hasChanges": false,
"range": [
109,
109
],
"number": 4
}
]
],
"paths": [
"string.js",
"string.js"
],
"oids": [
"ea5bd4251f8205df1cae5ad619f03d5678c1dd27",
"5cef047e9e767f816c969a8cd9ea312aaa7651ea"
]
},
"filePaths": [
"string.js"
],
"sha1": "2ec6001dd34498939531427aa22e78fa0afb91dd",
"gitDir": "test/corpus/repos/javascript",
"sha2": "9eb3deae19f408ceab51f467788ed5eb5af1d22f"
}
,{
"testCaseDescription": "javascript-string-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"patch": "replace",
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"range": [
0,
43
]
}
],
"hasChanges": true,
"range": [
0,
43
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"patch": "replace",
"range": [
0,
31
]
}
],
"range": [
0,
32
]
}
],
"range": [
0,
33
]
}
],
"hasChanges": true,
"range": [
0,
33
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
43,
74
]
}
],
"range": [
43,
75
]
}
],
"range": [
43,
76
]
}
],
"hasChanges": false,
"range": [
43,
76
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
33,
64
]
}
],
"range": [
33,
65
]
}
],
"range": [
33,
66
]
}
],
"hasChanges": false,
"range": [
33,
66
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
76,
107
]
}
],
"range": [
76,
108
]
}
],
"range": [
76,
109
]
}
],
"hasChanges": false,
"range": [
76,
109
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
66,
97
]
}
],
"range": [
66,
98
]
}
],
"range": [
66,
99
]
}
],
"hasChanges": false,
"range": [
66,
99
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
109,
109
]
}
],
"hasChanges": false,
"range": [
109,
109
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
99,
99
]
}
],
"hasChanges": false,
"range": [
99,
99
],
"number": 4
}
]
],
"paths": [
"string.js",
"string.js"
],
"oids": [
"5cef047e9e767f816c969a8cd9ea312aaa7651ea",
"7af39a55332095da6a9805ed6ab693ed8fabe6e7"
]
},
"filePaths": [
"string.js"
],
"sha1": "9eb3deae19f408ceab51f467788ed5eb5af1d22f",
"gitDir": "test/corpus/repos/javascript",
"sha2": "095b621ae55a5f630f91de653a9bbb4258c2f917"
}
,{
"testCaseDescription": "javascript-string-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"patch": "replace",
"range": [
0,
31
]
}
],
"range": [
0,
32
]
}
],
"range": [
0,
33
]
}
],
"hasChanges": true,
"range": [
0,
33
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"patch": "replace",
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"range": [
0,
43
]
}
],
"hasChanges": true,
"range": [
0,
43
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
33,
64
]
}
],
"range": [
33,
65
]
}
],
"range": [
33,
66
]
}
],
"hasChanges": false,
"range": [
33,
66
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
43,
74
]
}
],
"range": [
43,
75
]
}
],
"range": [
43,
76
]
}
],
"hasChanges": false,
"range": [
43,
76
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
66,
97
]
}
],
"range": [
66,
98
]
}
],
"range": [
66,
99
]
}
],
"hasChanges": false,
"range": [
66,
99
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
76,
107
]
}
],
"range": [
76,
108
]
}
],
"range": [
76,
109
]
}
],
"hasChanges": false,
"range": [
76,
109
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
99,
99
]
}
],
"hasChanges": false,
"range": [
99,
99
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
109,
109
]
}
],
"hasChanges": false,
"range": [
109,
109
],
"number": 4
}
]
],
"paths": [
"string.js",
"string.js"
],
"oids": [
"7af39a55332095da6a9805ed6ab693ed8fabe6e7",
"5cef047e9e767f816c969a8cd9ea312aaa7651ea"
]
},
"filePaths": [
"string.js"
],
"sha1": "095b621ae55a5f630f91de653a9bbb4258c2f917",
"gitDir": "test/corpus/repos/javascript",
"sha2": "a80f3999ca08acd0f7772f3a0302dfdf26fee813"
}
,{
"testCaseDescription": "javascript-string-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
0,
41
]
}
],
"patch": "delete",
"range": [
0,
42
]
}
],
"range": [
0,
43
]
}
],
"hasChanges": true,
"range": [
0,
43
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
43,
74
]
}
],
"patch": "delete",
"range": [
43,
75
]
}
],
"range": [
43,
76
]
}
],
"hasChanges": true,
"range": [
43,
76
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
76,
107
]
}
],
"range": [
76,
108
]
}
],
"range": [
76,
109
]
}
],
"hasChanges": false,
"range": [
76,
109
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
0,
31
]
}
],
"range": [
0,
32
]
}
],
"range": [
0,
33
]
}
],
"hasChanges": false,
"range": [
0,
33
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
33,
74
]
}
],
"patch": "insert",
"range": [
33,
75
]
}
],
"range": [
33,
76
]
}
],
"hasChanges": true,
"range": [
33,
76
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
109,
109
]
}
],
"hasChanges": false,
"range": [
109,
109
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
76,
76
]
}
],
"hasChanges": false,
"range": [
76,
76
],
"number": 3
}
]
],
"paths": [
"string.js",
"string.js"
],
"oids": [
"5cef047e9e767f816c969a8cd9ea312aaa7651ea",
"8dd4514f6c095a130233078e41cc3f60d0b1612e"
]
},
"filePaths": [
"string.js"
],
"sha1": "a80f3999ca08acd0f7772f3a0302dfdf26fee813",
"gitDir": "test/corpus/repos/javascript",
"sha2": "2962ba5a70c69ae5779d647732932de206fadd47"
}
,{
"testCaseDescription": "javascript-string-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
0,
31
]
}
],
"patch": "delete",
"range": [
0,
32
]
}
],
"range": [
0,
33
]
}
],
"hasChanges": true,
"range": [
0,
33
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
33,
74
]
}
],
"range": [
33,
75
]
}
],
"range": [
33,
76
]
}
],
"hasChanges": false,
"range": [
33,
76
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"range": [
0,
43
]
}
],
"hasChanges": false,
"range": [
0,
43
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
76,
76
]
}
],
"hasChanges": false,
"range": [
76,
76
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
43,
43
]
}
],
"hasChanges": false,
"range": [
43,
43
],
"number": 2
}
]
],
"paths": [
"string.js",
"string.js"
],
"oids": [
"8dd4514f6c095a130233078e41cc3f60d0b1612e",
"95fbde5dc8ec86189b6e5ebce7bcb8de25788390"
]
},
"filePaths": [
"string.js"
],
"sha1": "2962ba5a70c69ae5779d647732932de206fadd47",
"gitDir": "test/corpus/repos/javascript",
"sha2": "0415b106f557c84b6ab433005990488f61eca210"
}
,{
"testCaseDescription": "javascript-string-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "StringLiteral",
"range": [
0,
41
]
}
],
"range": [
0,
42
]
}
],
"patch": "delete",
"range": [
0,
43
]
}
],
"hasChanges": true,
"range": [
0,
43
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
43,
43
]
}
],
"hasChanges": true,
"range": [
43,
43
],
"number": 2
}
]
],
"paths": [
"string.js",
"string.js"
],
"oids": [
"95fbde5dc8ec86189b6e5ebce7bcb8de25788390",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"string.js"
],
"sha1": "0415b106f557c84b6ab433005990488f61eca210",
"gitDir": "test/corpus/repos/javascript",
"sha2": "9efe54b4d3f43994fbb659608be526dada4a01bc"
}]