1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00
semantic/test/corpus/diff-summaries/ruby/ternary.json
2016-10-26 14:32:08 -07:00

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": "f516d44e52ec24ea6812324872aa56159b2b4a9d",
"gitDir": "test/corpus/repos/ruby",
"sha2": "2d842da14717a168926069c3c3b3e44e3f812572"
}
,{
"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": "2d842da14717a168926069c3c3b3e44e3f812572",
"gitDir": "test/corpus/repos/ruby",
"sha2": "ea0e50c0ee7ccb86ff5bd970f3fc4d17b4e34678"
}
,{
"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": "ea0e50c0ee7ccb86ff5bd970f3fc4d17b4e34678",
"gitDir": "test/corpus/repos/ruby",
"sha2": "47c318260f03a4a43c01b6de34d3ec46be623d7d"
}
,{
"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": "47c318260f03a4a43c01b6de34d3ec46be623d7d",
"gitDir": "test/corpus/repos/ruby",
"sha2": "0560fa9c100e2d18fedbfee9e6301f4fea15c578"
}
,{
"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": "0560fa9c100e2d18fedbfee9e6301f4fea15c578",
"gitDir": "test/corpus/repos/ruby",
"sha2": "8e1a7a30f4c4d4fdb8a4d46e24e30ec4867bcb1e"
}
,{
"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": "8e1a7a30f4c4d4fdb8a4d46e24e30ec4867bcb1e",
"gitDir": "test/corpus/repos/ruby",
"sha2": "75a15b28217ab4606f5f27427d538b2211800d30"
}
,{
"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": "75a15b28217ab4606f5f27427d538b2211800d30",
"gitDir": "test/corpus/repos/ruby",
"sha2": "d372c8fe63c1cdb47b4394990cded924db6f53e2"
}]