2016-11-03 23:26:53 +03:00
|
|
|
[{
|
|
|
|
"testCaseDescription": "ruby-when-else-setup-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"when-else.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'foo' case statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"when-else.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/when-else.rb b/when-else.rb",
|
|
|
|
"index e69de29..3c8eff2 100644",
|
|
|
|
"--- a/when-else.rb",
|
|
|
|
"+++ b/when-else.rb",
|
|
|
|
"@@ -0,0 +1,4 @@",
|
|
|
|
"+case foo",
|
|
|
|
"+when bar",
|
|
|
|
"+ baz",
|
|
|
|
"+end"
|
|
|
|
],
|
2016-11-03 23:26:53 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2017-01-18 23:18:45 +03:00
|
|
|
"shas": "fa595ffd700b5088ab5990ee20ffa1e86262e5eb..562b40f87937992c9bf00fb3a9529195e907d8c9"
|
2016-11-03 23:26:53 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-when-else-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"when-else.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
4,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added an else block in the 'foo' case statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"when-else.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/when-else.rb b/when-else.rb",
|
|
|
|
"index 3c8eff2..fb2be92 100644",
|
|
|
|
"--- a/when-else.rb",
|
|
|
|
"+++ b/when-else.rb",
|
|
|
|
"@@ -1,4 +1,5 @@",
|
|
|
|
" case foo",
|
|
|
|
" when bar",
|
|
|
|
" baz",
|
|
|
|
"+else",
|
|
|
|
" end"
|
|
|
|
],
|
2016-11-03 23:26:53 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2017-01-18 23:18:45 +03:00
|
|
|
"shas": "562b40f87937992c9bf00fb3a9529195e907d8c9..6c1209efe637d99934078007ab28ef45e3bdba39"
|
2016-11-03 23:26:53 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-when-else-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"when-else.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-11-07 21:26:59 +03:00
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
4,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2016-11-03 23:26:53 +03:00
|
|
|
},
|
2016-12-13 02:27:09 +03:00
|
|
|
"summary": "Replaced an else block with the 'qoz' identifier in the 'foo' case statement"
|
2016-11-03 23:26:53 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"when-else.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/when-else.rb b/when-else.rb",
|
|
|
|
"index fb2be92..028bb59 100644",
|
|
|
|
"--- a/when-else.rb",
|
|
|
|
"+++ b/when-else.rb",
|
|
|
|
"@@ -2,4 +2,5 @@ case foo",
|
|
|
|
" when bar",
|
|
|
|
" baz",
|
|
|
|
" else",
|
|
|
|
"+ qoz",
|
|
|
|
" end"
|
|
|
|
],
|
2016-11-03 23:26:53 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2017-01-18 23:18:45 +03:00
|
|
|
"shas": "6c1209efe637d99934078007ab28ef45e3bdba39..e5d1d1c588f05de0df3bc326138165bd3563e52f"
|
2016-11-03 23:26:53 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-when-else-delete-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"when-else.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-11-07 21:26:59 +03:00
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
4,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2016-11-03 23:26:53 +03:00
|
|
|
},
|
2016-12-13 02:27:09 +03:00
|
|
|
"summary": "Replaced the 'qoz' identifier with an else block in the 'foo' case statement"
|
2016-11-03 23:26:53 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"when-else.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/when-else.rb b/when-else.rb",
|
|
|
|
"index 028bb59..fb2be92 100644",
|
|
|
|
"--- a/when-else.rb",
|
|
|
|
"+++ b/when-else.rb",
|
|
|
|
"@@ -2,5 +2,4 @@ case foo",
|
|
|
|
" when bar",
|
|
|
|
" baz",
|
|
|
|
" else",
|
|
|
|
"- qoz",
|
|
|
|
" end"
|
|
|
|
],
|
2016-11-03 23:26:53 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2017-01-18 23:18:45 +03:00
|
|
|
"shas": "e5d1d1c588f05de0df3bc326138165bd3563e52f..e6d7b1cbfd2a79b0a8a490e850e159b515ede261"
|
2016-11-03 23:26:53 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-when-else-delete-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"when-else.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
4,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted an else block in the 'foo' case statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"when-else.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/when-else.rb b/when-else.rb",
|
|
|
|
"index fb2be92..3c8eff2 100644",
|
|
|
|
"--- a/when-else.rb",
|
|
|
|
"+++ b/when-else.rb",
|
|
|
|
"@@ -1,5 +1,4 @@",
|
|
|
|
" case foo",
|
|
|
|
" when bar",
|
|
|
|
" baz",
|
|
|
|
"-else",
|
|
|
|
" end"
|
|
|
|
],
|
2016-11-03 23:26:53 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2017-01-18 23:18:45 +03:00
|
|
|
"shas": "e6d7b1cbfd2a79b0a8a490e850e159b515ede261..3fecab18f652050552dfa8dbe3011b6eb71ccc4a"
|
2016-11-03 23:26:53 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-when-else-teardown-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"when-else.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'foo' case statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"when-else.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/when-else.rb b/when-else.rb",
|
|
|
|
"index 3c8eff2..e69de29 100644",
|
|
|
|
"--- a/when-else.rb",
|
|
|
|
"+++ b/when-else.rb",
|
|
|
|
"@@ -1,4 +0,0 @@",
|
|
|
|
"-case foo",
|
|
|
|
"-when bar",
|
|
|
|
"- baz",
|
|
|
|
"-end"
|
|
|
|
],
|
2016-11-03 23:26:53 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2017-01-18 23:18:45 +03:00
|
|
|
"shas": "3fecab18f652050552dfa8dbe3011b6eb71ccc4a..423bdf5b08ed67aff89dc71f86c560b51a5a8c7b"
|
2016-11-03 23:26:53 +03:00
|
|
|
}]
|