1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/ruby/ternary.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": "b376a6502c23b7b94d6efee0a76b17e2640aef4d",
"gitDir": "test/corpus/repos/ruby",
"sha2": "bc3ef1af110f3b4946bebb80b0867d4faaa3507b"
}
,{
"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": "bc3ef1af110f3b4946bebb80b0867d4faaa3507b",
"gitDir": "test/corpus/repos/ruby",
"sha2": "89fd22a24b24b8bcf436f573522763d14e4106fc"
}
,{
"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": "89fd22a24b24b8bcf436f573522763d14e4106fc",
"gitDir": "test/corpus/repos/ruby",
"sha2": "e2e21d71fd802437e8dbad21935f250533e7df3a"
}
,{
"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": "e2e21d71fd802437e8dbad21935f250533e7df3a",
"gitDir": "test/corpus/repos/ruby",
"sha2": "cd5c763be27a3d78af046cb1cfa232bc93eacd3f"
}
,{
"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": "cd5c763be27a3d78af046cb1cfa232bc93eacd3f",
"gitDir": "test/corpus/repos/ruby",
"sha2": "80ef1b4bfb7abe5872b0a52e38a87b30cd714624"
}
,{
"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": "80ef1b4bfb7abe5872b0a52e38a87b30cd714624",
"gitDir": "test/corpus/repos/ruby",
"sha2": "d919188c2a896ca4556f9fb22752cba09f767620"
}
,{
"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": "d919188c2a896ca4556f9fb22752cba09f767620",
"gitDir": "test/corpus/repos/ruby",
"sha2": "382de21a51f33359c0f80e41a30cbe75b90e994c"
}]