2016-10-24 20:43:31 +03:00
|
|
|
[{
|
|
|
|
"testCaseDescription": "ruby-ternary-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"ternary.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-11-04 22:57:08 +03:00
|
|
|
20
|
2016-10-24 20:43:31 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-04 22:57:08 +03:00
|
|
|
"summary": "Added the 'foo' ternary expression"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"ternary.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/ternary.rb b/ternary.rb",
|
2016-11-04 22:57:08 +03:00
|
|
|
"index e69de29..cc46e6d 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- a/ternary.rb",
|
|
|
|
"+++ b/ternary.rb",
|
|
|
|
"@@ -0,0 +1 @@",
|
2016-11-04 22:57:08 +03:00
|
|
|
"+foo ? case1 : case2"
|
2016-11-04 01:41:59 +03:00
|
|
|
],
|
2016-10-24 20:43:31 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-11-04 22:57:08 +03:00
|
|
|
"shas": "97f870df43868da61ab367aca7fcbfdf8a77aa00..e1f849d81b2f0565744fbf4f45a7cf54b924eae8"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-ternary-replacement-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"ternary.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-11-04 22:57:08 +03:00
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
12
|
|
|
|
]
|
|
|
|
}
|
2016-10-24 20:43:31 +03:00
|
|
|
},
|
2016-11-04 22:57:08 +03:00
|
|
|
"summary": "Added the 'bar' ternary expression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
2,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
2,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'foo' ternary expression"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"ternary.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/ternary.rb b/ternary.rb",
|
2016-11-04 22:57:08 +03:00
|
|
|
"index cc46e6d..44ee69e 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- a/ternary.rb",
|
|
|
|
"+++ b/ternary.rb",
|
|
|
|
"@@ -1 +1,3 @@",
|
2016-11-04 22:57:08 +03:00
|
|
|
"+bar ? a : b",
|
|
|
|
"+foo ? case1 : case2",
|
|
|
|
" foo ? case1 : case2"
|
2016-11-04 01:41:59 +03:00
|
|
|
],
|
2016-10-24 20:43:31 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-11-04 22:57:08 +03:00
|
|
|
"shas": "e1f849d81b2f0565744fbf4f45a7cf54b924eae8..15476ef40fd0d4fd9c8ae6157dc6039fbc450716"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-ternary-delete-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"ternary.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-04 22:57:08 +03:00
|
|
|
1,
|
|
|
|
4
|
2016-10-24 20:43:31 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-11-04 22:57:08 +03:00
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the 'foo' ternary expression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
7
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
7
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
12
|
2016-10-24 20:43:31 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-04 22:57:08 +03:00
|
|
|
"summary": "Replaced the 'a' identifier with the 'case1' identifier in the 'foo' ternary expression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
11
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
12
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
15
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'b' identifier with the 'case2' identifier in the 'foo' ternary expression"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"ternary.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/ternary.rb b/ternary.rb",
|
2016-11-04 22:57:08 +03:00
|
|
|
"index 44ee69e..86614c8 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- a/ternary.rb",
|
|
|
|
"+++ b/ternary.rb",
|
|
|
|
"@@ -1,3 +1,3 @@",
|
2016-11-04 22:57:08 +03:00
|
|
|
"-bar ? a : b",
|
|
|
|
"+foo ? case1 : case2",
|
|
|
|
" foo ? case1 : case2",
|
|
|
|
" foo ? case1 : case2"
|
2016-11-04 01:41:59 +03:00
|
|
|
],
|
2016-10-24 20:43:31 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-11-04 22:57:08 +03:00
|
|
|
"shas": "15476ef40fd0d4fd9c8ae6157dc6039fbc450716..0f6207e02eb77f9f87e4a2b7256e0a80f978adc8"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-ternary-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"ternary.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-11-04 22:57:08 +03:00
|
|
|
4
|
2016-10-24 20:43:31 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-04 22:57:08 +03:00
|
|
|
1,
|
|
|
|
4
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the 'bar' ternary expression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
7
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
12
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
7
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
8
|
2016-10-24 20:43:31 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-04 22:57:08 +03:00
|
|
|
"summary": "Replaced the 'case1' identifier with the 'a' identifier in the 'bar' ternary expression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
15
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
11
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
12
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'case2' identifier with the 'b' identifier in the 'bar' ternary expression"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"ternary.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/ternary.rb b/ternary.rb",
|
2016-11-04 22:57:08 +03:00
|
|
|
"index 86614c8..44ee69e 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- a/ternary.rb",
|
|
|
|
"+++ b/ternary.rb",
|
|
|
|
"@@ -1,3 +1,3 @@",
|
2016-11-04 22:57:08 +03:00
|
|
|
"-foo ? case1 : case2",
|
|
|
|
"+bar ? a : b",
|
|
|
|
" foo ? case1 : case2",
|
|
|
|
" foo ? case1 : case2"
|
2016-11-04 01:41:59 +03:00
|
|
|
],
|
2016-10-24 20:43:31 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-11-04 22:57:08 +03:00
|
|
|
"shas": "0f6207e02eb77f9f87e4a2b7256e0a80f978adc8..1eb7b010282784002c1064e2433e57457e048cbb"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-ternary-delete-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"ternary.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-11-04 22:57:08 +03:00
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
12
|
|
|
|
]
|
|
|
|
}
|
2016-10-24 20:43:31 +03:00
|
|
|
},
|
2016-11-04 22:57:08 +03:00
|
|
|
"summary": "Deleted the 'bar' ternary expression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
2,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
2,
|
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'foo' ternary expression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
2,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
2,
|
|
|
|
12
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'bar' ternary expression"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"ternary.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/ternary.rb b/ternary.rb",
|
2016-11-04 22:57:08 +03:00
|
|
|
"index 44ee69e..1ce4e51 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- a/ternary.rb",
|
|
|
|
"+++ b/ternary.rb",
|
|
|
|
"@@ -1,3 +1,2 @@",
|
2016-11-04 22:57:08 +03:00
|
|
|
"-bar ? a : b",
|
|
|
|
"-foo ? case1 : case2",
|
|
|
|
" foo ? case1 : case2",
|
|
|
|
"+bar ? a : b"
|
2016-11-04 01:41:59 +03:00
|
|
|
],
|
2016-10-24 20:43:31 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-11-04 22:57:08 +03:00
|
|
|
"shas": "1eb7b010282784002c1064e2433e57457e048cbb..16fba8824d7b308daeae80ae16375ff007846b9b"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-ternary-delete-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"ternary.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-10-26 22:54:21 +03:00
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-11-04 22:57:08 +03:00
|
|
|
20
|
2016-10-26 22:54:21 +03:00
|
|
|
]
|
|
|
|
}
|
2016-10-24 20:43:31 +03:00
|
|
|
},
|
2016-11-04 22:57:08 +03:00
|
|
|
"summary": "Deleted the 'foo' ternary expression"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"ternary.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/ternary.rb b/ternary.rb",
|
2016-11-04 22:57:08 +03:00
|
|
|
"index 1ce4e51..7f42328 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- a/ternary.rb",
|
|
|
|
"+++ b/ternary.rb",
|
|
|
|
"@@ -1,2 +1 @@",
|
2016-11-04 22:57:08 +03:00
|
|
|
"-foo ? case1 : case2",
|
|
|
|
" bar ? a : b"
|
2016-11-04 01:41:59 +03:00
|
|
|
],
|
2016-10-24 20:43:31 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-11-04 22:57:08 +03:00
|
|
|
"shas": "16fba8824d7b308daeae80ae16375ff007846b9b..0783eee8d94a9d7a8f7d590f0a9716617e145336"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "ruby-ternary-delete-rest-test",
|
|
|
|
"expectedResult": {
|
2016-11-04 22:57:08 +03:00
|
|
|
"changes": {
|
2016-10-24 20:43:31 +03:00
|
|
|
"ternary.rb": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-04 22:57:08 +03:00
|
|
|
1,
|
|
|
|
12
|
2016-10-24 20:43:31 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-04 22:57:08 +03:00
|
|
|
"summary": "Deleted the 'bar' ternary expression"
|
2016-10-24 20:43:31 +03:00
|
|
|
}
|
|
|
|
]
|
2016-11-04 22:57:08 +03:00
|
|
|
},
|
|
|
|
"errors": {}
|
2016-10-24 20:43:31 +03:00
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"ternary.rb"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/ternary.rb b/ternary.rb",
|
2016-11-04 22:57:08 +03:00
|
|
|
"index 7f42328..e69de29 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- a/ternary.rb",
|
|
|
|
"+++ b/ternary.rb",
|
|
|
|
"@@ -1 +0,0 @@",
|
2016-11-04 22:57:08 +03:00
|
|
|
"-bar ? a : b"
|
2016-11-04 01:41:59 +03:00
|
|
|
],
|
2016-10-24 20:43:31 +03:00
|
|
|
"gitDir": "test/corpus/repos/ruby",
|
2016-11-04 22:57:08 +03:00
|
|
|
"shas": "0783eee8d94a9d7a8f7d590f0a9716617e145336..ec2870c9e829ba9514a3fc196f778f73f25ff514"
|
2016-10-24 20:43:31 +03:00
|
|
|
}]
|