1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/ruby/while.json
2017-01-10 16:58:40 -05:00

443 lines
12 KiB
JSON

[{
"testCaseDescription": "ruby-while-insert-test",
"expectedResult": {
"changes": {
"while.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
2,
4
]
}
},
"summary": "Added the 'foo' while statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
14
]
}
},
"summary": "Added the 'run' while statement"
}
]
},
"errors": {}
},
"filePaths": [
"while.rb"
],
"patch": [
"diff --git a/while.rb b/while.rb",
"index e69de29..9990bdf 100644",
"--- a/while.rb",
"+++ b/while.rb",
"@@ -0,0 +1,3 @@",
"+while foo do",
"+end",
"+foo while run"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "75359fce842411630cf517ec7d9eedbe79f32f44..4bd97aba2b470e9963c1e54256cc2d73b18ca7d2"
}
,{
"testCaseDescription": "ruby-while-replacement-insert-test",
"expectedResult": {
"changes": {
"while.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Added the 'foo' while statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
5,
4
]
}
},
"summary": "Added the 'foo' while statement"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
14
]
}
},
"summary": "Added the 'run' while statement"
}
]
},
"errors": {}
},
"filePaths": [
"while.rb"
],
"patch": [
"diff --git a/while.rb b/while.rb",
"index 9990bdf..5a24260 100644",
"--- a/while.rb",
"+++ b/while.rb",
"@@ -1,3 +1,9 @@",
"+while foo",
"+ bar",
"+end",
"+while foo do",
"+end",
"+foo while run",
" while foo do",
" end",
" foo while run"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "4bd97aba2b470e9963c1e54256cc2d73b18ca7d2..d8afae03224b020070749e2a23b6f241a67a00ba"
}
,{
"testCaseDescription": "ruby-while-delete-insert-test",
"expectedResult": {
"changes": {
"while.rb": [
{
"span": {
"delete": {
"start": [
2,
3
],
"end": [
2,
6
]
}
},
"summary": "Deleted the 'bar' identifier"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
14
]
}
},
"summary": "Added the 'run' while statement"
}
]
},
"errors": {}
},
"filePaths": [
"while.rb"
],
"patch": [
"diff --git a/while.rb b/while.rb",
"index 5a24260..c0c26cd 100644",
"--- a/while.rb",
"+++ b/while.rb",
"@@ -1,6 +1,6 @@",
"-while foo",
"- bar",
"+while foo do",
" end",
"+foo while run",
" while foo do",
" end",
" foo while run"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d8afae03224b020070749e2a23b6f241a67a00ba..d37adef218776f808d0e47374113fec718e65ffe"
}
,{
"testCaseDescription": "ruby-while-replacement-test",
"expectedResult": {
"changes": {
"while.rb": [
{
"span": {
"insert": {
"start": [
2,
3
],
"end": [
2,
6
]
}
},
"summary": "Added the 'bar' identifier"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
14
]
}
},
"summary": "Deleted the 'run' while statement"
}
]
},
"errors": {}
},
"filePaths": [
"while.rb"
],
"patch": [
"diff --git a/while.rb b/while.rb",
"index c0c26cd..5a24260 100644",
"--- a/while.rb",
"+++ b/while.rb",
"@@ -1,6 +1,6 @@",
"-while foo do",
"+while foo",
"+ bar",
" end",
"-foo while run",
" while foo do",
" end",
" foo while run"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d37adef218776f808d0e47374113fec718e65ffe..9364a09bba6bd59368d42b559d4552903187513a"
}
,{
"testCaseDescription": "ruby-while-delete-replacement-test",
"expectedResult": {
"changes": {
"while.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Deleted the 'foo' while statement"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
5,
4
]
}
},
"summary": "Deleted the 'foo' while statement"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
14
]
}
},
"summary": "Deleted the 'run' while statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
6,
4
]
}
},
"summary": "Added the 'foo' while statement"
}
]
},
"errors": {}
},
"filePaths": [
"while.rb"
],
"patch": [
"diff --git a/while.rb b/while.rb",
"index 5a24260..3763a72 100644",
"--- a/while.rb",
"+++ b/while.rb",
"@@ -1,9 +1,6 @@",
"-while foo",
"- bar",
"-end",
" while foo do",
" end",
" foo while run",
"-while foo do",
"+while foo",
"+ bar",
" end",
"-foo while run"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "9364a09bba6bd59368d42b559d4552903187513a..92249e7f6cca9a05ea4fec8204cf64299f94cfbd"
}
,{
"testCaseDescription": "ruby-while-delete-test",
"expectedResult": {
"changes": {
"while.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
2,
4
]
}
},
"summary": "Deleted the 'foo' while statement"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
14
]
}
},
"summary": "Deleted the 'run' while statement"
}
]
},
"errors": {}
},
"filePaths": [
"while.rb"
],
"patch": [
"diff --git a/while.rb b/while.rb",
"index 3763a72..57e673b 100644",
"--- a/while.rb",
"+++ b/while.rb",
"@@ -1,6 +1,3 @@",
"-while foo do",
"-end",
"-foo while run",
" while foo",
" bar",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "92249e7f6cca9a05ea4fec8204cf64299f94cfbd..d65072bc4ae578b47f6b49010f9733c45329976c"
}
,{
"testCaseDescription": "ruby-while-delete-rest-test",
"expectedResult": {
"changes": {
"while.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Deleted the 'foo' while statement"
}
]
},
"errors": {}
},
"filePaths": [
"while.rb"
],
"patch": [
"diff --git a/while.rb b/while.rb",
"index 57e673b..e69de29 100644",
"--- a/while.rb",
"+++ b/while.rb",
"@@ -1,3 +0,0 @@",
"-while foo",
"- bar",
"-end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d65072bc4ae578b47f6b49010f9733c45329976c..8acc6850685b258991defd4452419a4329e6bb56"
}]