mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +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": "b0948d2f824b6254c6a4a016e6b10fd62e995282",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "25015c9dc6ce52f0ddb721f2a73be80c1fcba50a"
|
|
}
|
|
,{
|
|
"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": "25015c9dc6ce52f0ddb721f2a73be80c1fcba50a",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "bf6318e9c6a3e96dcbe4cd44ea3f0e125f3be588"
|
|
}
|
|
,{
|
|
"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": "bf6318e9c6a3e96dcbe4cd44ea3f0e125f3be588",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "7bd681d3d856de0ae389d126b94d9750703c3b38"
|
|
}
|
|
,{
|
|
"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": "7bd681d3d856de0ae389d126b94d9750703c3b38",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "379a38e36050cb4d4bec26d7b53204428c0205f2"
|
|
}
|
|
,{
|
|
"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": "379a38e36050cb4d4bec26d7b53204428c0205f2",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "649fb9b04d1f105132bf9ab48baf1ae8f9f25ace"
|
|
}
|
|
,{
|
|
"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": "649fb9b04d1f105132bf9ab48baf1ae8f9f25ace",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "7686264351b1ba0d9c2bb7e6308ba198b2366276"
|
|
}
|
|
,{
|
|
"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": "7686264351b1ba0d9c2bb7e6308ba198b2366276",
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"sha2": "3cd95dc9b3a4cc6e0dbeb10786b8eca868e04d94"
|
|
}]
|