mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
266 lines
8.5 KiB
JSON
266 lines
8.5 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-ternary-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ternary.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'condition' ternary expression"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ternary.rb"
|
|
],
|
|
"sha1": "3c34a0be5940d52d8d916fe0fc28afd12cf554c7",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "07b53bb6e1840602ceca4368a2793032e1ed6b72"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ternary-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ternary.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
26
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
1
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'condition' ternary expression with the 'if condition then case 1 else case2\ncondition ? case1 : case2\ncondition ? case1 : case2\n' at line 1, column 1 - line 4, column 1"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ternary.rb"
|
|
],
|
|
"sha1": "07b53bb6e1840602ceca4368a2793032e1ed6b72",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "bbad52f58966bf3d585cea71f3b0dad184697371"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ternary-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ternary.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
26
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'if condition then case 1 else case2\ncondition ? case1 : case2\ncondition ? case1 : case2\n' at line 1, column 1 - line 4, column 1 with the 'condition' ternary expression"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ternary.rb"
|
|
],
|
|
"sha1": "bbad52f58966bf3d585cea71f3b0dad184697371",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "d9b9dee5d6f4a3f78a8462df0d593de81e81ace4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ternary-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ternary.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
26
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
1
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'condition' ternary expression with the 'if condition then case 1 else case2\ncondition ? case1 : case2\ncondition ? case1 : case2\n' at line 1, column 1 - line 4, column 1"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ternary.rb"
|
|
],
|
|
"sha1": "d9b9dee5d6f4a3f78a8462df0d593de81e81ace4",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "e3ad229f3486eccd442910cee359a56c29e41715"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ternary-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ternary.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
26
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'if condition then case 1 else case2\ncondition ? case1 : case2\ncondition ? case1 : case2\n' at line 1, column 1 - line 4, column 1 with the 'condition' ternary expression"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ternary.rb"
|
|
],
|
|
"sha1": "e3ad229f3486eccd442910cee359a56c29e41715",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "34c8368e9e93f2f503f3ecdc1f616c4826604eb6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ternary-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"ternary.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'condition' ternary expression"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"ternary.rb"
|
|
],
|
|
"sha1": "34c8368e9e93f2f503f3ecdc1f616c4826604eb6",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "d76d4cd9bd5c5734396d651bfd3d45b26fced7b5"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-ternary-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"ternary.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'if condition then case 1 else case2\n' at line 1, column 1 - line 2, column 1"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"ternary.rb"
|
|
],
|
|
"sha1": "d76d4cd9bd5c5734396d651bfd3d45b26fced7b5",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "b91053c0dcb38d222ea60dda6b742985fb39d27f"
|
|
}]
|