1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00
semantic/test/corpus/json/javascript/number.json

1336 lines
46 KiB
JSON
Raw Normal View History

[{
"testCaseDescription": "javascript-number-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
0,
3
]
}
],
"range": [
0,
4
]
}
],
"patch": "insert",
"range": [
0,
4
]
}
],
"hasChanges": true,
"range": [
0,
4
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
4,
4
]
}
],
"hasChanges": true,
"range": [
4,
4
],
"number": 2
}
]
],
"paths": [
"number.js",
"number.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"398050c62c882fa5ebc8d8aaa2e730e70790beeb"
]
},
"filePaths": [
"number.js"
],
2016-11-01 18:03:25 +03:00
"sha1": "b67fb393db888ee6bdca0982b355ca9bc7223bab",
"gitDir": "test/corpus/repos/javascript",
2016-11-01 18:03:25 +03:00
"sha2": "5ee8e321ad630d3fc92e3df11212190fff81ab49"
}
,{
"testCaseDescription": "javascript-number-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
0,
3
]
}
],
"patch": "insert",
"range": [
0,
4
]
}
],
"range": [
0,
4
]
}
],
"hasChanges": true,
"range": [
0,
4
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
4,
7
]
}
],
"patch": "insert",
"range": [
4,
8
]
}
],
"range": [
4,
8
]
}
],
"hasChanges": true,
"range": [
4,
8
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
0,
3
]
}
],
"range": [
0,
4
]
}
],
"range": [
0,
4
]
}
],
"hasChanges": false,
"range": [
0,
4
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
8,
11
]
}
],
"range": [
8,
12
]
}
],
"range": [
8,
12
]
}
],
"hasChanges": false,
"range": [
8,
12
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
4,
4
]
}
],
"hasChanges": false,
"range": [
4,
4
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
12,
12
]
}
],
"hasChanges": false,
"range": [
12,
12
],
"number": 4
}
]
],
"paths": [
"number.js",
"number.js"
],
"oids": [
"398050c62c882fa5ebc8d8aaa2e730e70790beeb",
"16da476c5eb0a463dd2f919bda7acf6bb56f15c8"
]
},
"filePaths": [
"number.js"
],
2016-11-01 18:03:25 +03:00
"sha1": "5ee8e321ad630d3fc92e3df11212190fff81ab49",
"gitDir": "test/corpus/repos/javascript",
2016-11-01 18:03:25 +03:00
"sha2": "d4f203b0652b60ed837c2d3908e6a4909ff21dd6"
}
,{
"testCaseDescription": "javascript-number-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
0,
3
]
}
],
"range": [
0,
4
]
}
],
"range": [
0,
4
]
}
],
"hasChanges": true,
"range": [
0,
4
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
0,
3
]
}
],
"range": [
0,
4
]
}
],
"range": [
0,
4
]
}
],
"hasChanges": true,
"range": [
0,
4
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
4,
7
]
}
],
"range": [
4,
8
]
}
],
"range": [
4,
8
]
}
],
"hasChanges": false,
"range": [
4,
8
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
4,
7
]
}
],
"range": [
4,
8
]
}
],
"range": [
4,
8
]
}
],
"hasChanges": false,
"range": [
4,
8
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
8,
11
]
}
],
"range": [
8,
12
]
}
],
"range": [
8,
12
]
}
],
"hasChanges": false,
"range": [
8,
12
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
8,
11
]
}
],
"range": [
8,
12
]
}
],
"range": [
8,
12
]
}
],
"hasChanges": false,
"range": [
8,
12
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
12,
12
]
}
],
"hasChanges": false,
"range": [
12,
12
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
12,
12
]
}
],
"hasChanges": false,
"range": [
12,
12
],
"number": 4
}
]
],
"paths": [
"number.js",
"number.js"
],
"oids": [
"16da476c5eb0a463dd2f919bda7acf6bb56f15c8",
"252b3e84820efae4196cb2066888a12a7cc5087d"
]
},
"filePaths": [
"number.js"
],
2016-11-01 18:03:25 +03:00
"sha1": "d4f203b0652b60ed837c2d3908e6a4909ff21dd6",
"gitDir": "test/corpus/repos/javascript",
2016-11-01 18:03:25 +03:00
"sha2": "e60ffcddb0c2bf7f37878b77d9659e82498b4927"
}
,{
"testCaseDescription": "javascript-number-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
0,
3
]
}
],
"range": [
0,
4
]
}
],
"range": [
0,
4
]
}
],
"hasChanges": true,
"range": [
0,
4
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"patch": "replace",
"range": [
0,
3
]
}
],
"range": [
0,
4
]
}
],
"range": [
0,
4
]
}
],
"hasChanges": true,
"range": [
0,
4
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
4,
7
]
}
],
"range": [
4,
8
]
}
],
"range": [
4,
8
]
}
],
"hasChanges": false,
"range": [
4,
8
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
4,
7
]
}
],
"range": [
4,
8
]
}
],
"range": [
4,
8
]
}
],
"hasChanges": false,
"range": [
4,
8
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
8,
11
]
}
],
"range": [
8,
12
]
}
],
"range": [
8,
12
]
}
],
"hasChanges": false,
"range": [
8,
12
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
8,
11
]
}
],
"range": [
8,
12
]
}
],
"range": [
8,
12
]
}
],
"hasChanges": false,
"range": [
8,
12
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
12,
12
]
}
],
"hasChanges": false,
"range": [
12,
12
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
12,
12
]
}
],
"hasChanges": false,
"range": [
12,
12
],
"number": 4
}
]
],
"paths": [
"number.js",
"number.js"
],
"oids": [
"252b3e84820efae4196cb2066888a12a7cc5087d",
"16da476c5eb0a463dd2f919bda7acf6bb56f15c8"
]
},
"filePaths": [
"number.js"
],
2016-11-01 18:03:25 +03:00
"sha1": "e60ffcddb0c2bf7f37878b77d9659e82498b4927",
"gitDir": "test/corpus/repos/javascript",
2016-11-01 18:03:25 +03:00
"sha2": "a0c9a4267183e7ca1b994634af653b784f63ea37"
}
,{
"testCaseDescription": "javascript-number-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
0,
3
]
}
],
"patch": "delete",
"range": [
0,
4
]
}
],
"range": [
0,
4
]
}
],
"hasChanges": true,
"range": [
0,
4
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
4,
7
]
}
],
"patch": "delete",
"range": [
4,
8
]
}
],
"range": [
4,
8
]
}
],
"hasChanges": true,
"range": [
4,
8
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
8,
11
]
}
],
"range": [
8,
12
]
}
],
"range": [
8,
12
]
}
],
"hasChanges": false,
"range": [
8,
12
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
0,
3
]
}
],
"range": [
0,
4
]
}
],
"range": [
0,
4
]
}
],
"hasChanges": false,
"range": [
0,
4
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
4,
7
]
}
],
"patch": "insert",
"range": [
4,
8
]
}
],
"range": [
4,
8
]
}
],
"hasChanges": true,
"range": [
4,
8
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
12,
12
]
}
],
"hasChanges": false,
"range": [
12,
12
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
8,
8
]
}
],
"hasChanges": false,
"range": [
8,
8
],
"number": 3
}
]
],
"paths": [
"number.js",
"number.js"
],
"oids": [
"16da476c5eb0a463dd2f919bda7acf6bb56f15c8",
"bb77dfbdf4e6fac33e22e4caf91084f3a6fccb07"
]
},
"filePaths": [
"number.js"
],
2016-11-01 18:03:25 +03:00
"sha1": "a0c9a4267183e7ca1b994634af653b784f63ea37",
"gitDir": "test/corpus/repos/javascript",
2016-11-01 18:03:25 +03:00
"sha2": "840e0931a5584f27b0663520a2b6fc3fa7b58123"
}
,{
"testCaseDescription": "javascript-number-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
0,
3
]
}
],
"patch": "delete",
"range": [
0,
4
]
}
],
"range": [
0,
4
]
}
],
"hasChanges": true,
"range": [
0,
4
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
4,
7
]
}
],
"range": [
4,
8
]
}
],
"range": [
4,
8
]
}
],
"hasChanges": false,
"range": [
4,
8
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
0,
3
]
}
],
"range": [
0,
4
]
}
],
"range": [
0,
4
]
}
],
"hasChanges": false,
"range": [
0,
4
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
8,
8
]
}
],
"hasChanges": false,
"range": [
8,
8
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
4,
4
]
}
],
"hasChanges": false,
"range": [
4,
4
],
"number": 2
}
]
],
"paths": [
"number.js",
"number.js"
],
"oids": [
"bb77dfbdf4e6fac33e22e4caf91084f3a6fccb07",
"257e563266b43281b3fbb3632ab67ab0d3f314e9"
]
},
"filePaths": [
"number.js"
],
2016-11-01 18:03:25 +03:00
"sha1": "840e0931a5584f27b0663520a2b6fc3fa7b58123",
"gitDir": "test/corpus/repos/javascript",
2016-11-01 18:03:25 +03:00
"sha2": "ce7b36cc4ae48511c6299ef5c0a1401901d0bb56"
}
,{
"testCaseDescription": "javascript-number-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "NumberLiteral",
"range": [
0,
3
]
}
],
"range": [
0,
4
]
}
],
"patch": "delete",
"range": [
0,
4
]
}
],
"hasChanges": true,
"range": [
0,
4
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
4,
4
]
}
],
"hasChanges": true,
"range": [
4,
4
],
"number": 2
}
]
],
"paths": [
"number.js",
"number.js"
],
"oids": [
"257e563266b43281b3fbb3632ab67ab0d3f314e9",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"number.js"
],
2016-11-01 18:03:25 +03:00
"sha1": "ce7b36cc4ae48511c6299ef5c0a1401901d0bb56",
"gitDir": "test/corpus/repos/javascript",
2016-11-01 18:03:25 +03:00
"sha2": "41804b3c63fe5f732432e8cf7e89b2cb015433dd"
}]