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 10:27:38 -07:00

278 lines
9.0 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": "279db06fb4c7847ecafcd8cda4ea46d4613e25b7",
"gitDir": "test/corpus/repos/ruby",
"sha2": "67784bd6010976a3bbb484f13c113d64c2df36e1"
}
,{
"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": "67784bd6010976a3bbb484f13c113d64c2df36e1",
"gitDir": "test/corpus/repos/ruby",
"sha2": "3e365f7aaa13dd5c93ae7c0352b1081a9c49d0a7"
}
,{
"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": "3e365f7aaa13dd5c93ae7c0352b1081a9c49d0a7",
"gitDir": "test/corpus/repos/ruby",
"sha2": "9c9deeb3a60bd9cf763a60c789f54f326ee99f08"
}
,{
"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": "9c9deeb3a60bd9cf763a60c789f54f326ee99f08",
"gitDir": "test/corpus/repos/ruby",
"sha2": "26007b128511147daed250b41158549e1d27631a"
}
,{
"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": "26007b128511147daed250b41158549e1d27631a",
"gitDir": "test/corpus/repos/ruby",
"sha2": "fc6e4ba387f179b95a336ead0bb8148d9c86dcec"
}
,{
"testCaseDescription": "ruby-ternary-delete-test",
"expectedResult": {
"changes": {
"ternary.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
26
]
},
{
"start": [
1,
1
],
"end": [
2,
1
]
}
]
},
"summary": "Replaced the 'condition' ternary expression with the 'if condition then case 1 else case2\n' at line 1, column 1 - line 2, column 1"
}
]
},
"errors": {}
},
"filePaths": [
"ternary.rb"
],
"sha1": "fc6e4ba387f179b95a336ead0bb8148d9c86dcec",
"gitDir": "test/corpus/repos/ruby",
"sha2": "8074610181409e835411b12a17e136e7f378331f"
}
,{
"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": "8074610181409e835411b12a17e136e7f378331f",
"gitDir": "test/corpus/repos/ruby",
"sha2": "594f2f2b8f5dd265329c5911e66866f120934461"
}]