1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/ruby/elsif.json

247 lines
6.6 KiB
JSON
Raw Normal View History

2016-11-02 22:32:46 +03:00
[{
"testCaseDescription": "ruby-elsif-setup-test",
2016-11-02 22:32:46 +03:00
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
3,
2016-11-02 22:32:46 +03:00
4
]
}
},
"summary": "Added the 'bar' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index e69de29..89b5cd5 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -0,0 +1,3 @@",
"+if bar",
"+ foo()",
"+end"
],
2016-11-02 22:32:46 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "d571b61c3d53f568ed84cc6dad1c76cea2abe08d..adfbf640ca01c2a8140a30b71499b03d8e9602db"
2016-11-02 22:32:46 +03:00
}
,{
"testCaseDescription": "ruby-elsif-insert-test",
2016-11-02 22:32:46 +03:00
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"insert": {
"start": [
3,
2016-11-02 22:32:46 +03:00
1
],
"end": [
4,
1
2016-11-02 22:32:46 +03:00
]
}
},
"summary": "Added the 'baz' elsif block"
2016-11-02 22:32:46 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index 89b5cd5..945e953 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -1,3 +1,4 @@",
" if bar",
" foo()",
"+elsif baz",
" end"
],
2016-11-02 22:32:46 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "adfbf640ca01c2a8140a30b71499b03d8e9602db..c56c2c77e578103675c05343baa6ac9b57de69c9"
2016-11-02 22:32:46 +03:00
}
,{
"testCaseDescription": "ruby-elsif-replacement-test",
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"insert": {
"start": [
4,
3
],
"end": [
4,
8
]
}
},
2016-11-03 03:18:09 +03:00
"summary": "Added the 'qoz()' function call in the 'baz' elsif block"
2016-11-02 22:32:46 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index 945e953..8e4733f 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -1,4 +1,5 @@",
" if bar",
" foo()",
" elsif baz",
"+ qoz()",
" end"
],
2016-11-02 22:32:46 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "c56c2c77e578103675c05343baa6ac9b57de69c9..9d868b4d65a258ca50a0432f32d6ce476a0ec90b"
2016-11-02 22:32:46 +03:00
}
,{
"testCaseDescription": "ruby-elsif-delete-replacement-test",
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"delete": {
"start": [
4,
3
2016-11-02 22:32:46 +03:00
],
"end": [
4,
8
2016-11-02 22:32:46 +03:00
]
}
},
"summary": "Deleted the 'qoz()' function call in the 'baz' elsif block"
2016-11-02 22:32:46 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index 8e4733f..945e953 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -1,5 +1,4 @@",
" if bar",
" foo()",
" elsif baz",
"- qoz()",
" end"
],
2016-11-02 22:32:46 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "9d868b4d65a258ca50a0432f32d6ce476a0ec90b..ae5492ab9e3097846c7c9365e1dba37799da7cf0"
2016-11-02 22:32:46 +03:00
}
,{
"testCaseDescription": "ruby-elsif-delete-insert-test",
2016-11-02 22:32:46 +03:00
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"delete": {
"start": [
3,
2016-11-02 22:32:46 +03:00
1
],
"end": [
4,
1
2016-11-02 22:32:46 +03:00
]
}
},
"summary": "Deleted the 'baz' elsif block"
2016-11-02 22:32:46 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index 945e953..89b5cd5 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -1,4 +1,3 @@",
" if bar",
" foo()",
"-elsif baz",
" end"
],
2016-11-02 22:32:46 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "ae5492ab9e3097846c7c9365e1dba37799da7cf0..3c79699074347065dc50d414845fc7dada45dc0e"
2016-11-02 22:32:46 +03:00
}
,{
"testCaseDescription": "ruby-elsif-teardown-test",
2016-11-02 22:32:46 +03:00
"expectedResult": {
"changes": {
"elsif.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
2016-11-02 22:32:46 +03:00
4
]
}
},
"summary": "Deleted the 'bar' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"elsif.rb"
],
"patch": [
"diff --git a/elsif.rb b/elsif.rb",
"index 89b5cd5..e69de29 100644",
"--- a/elsif.rb",
"+++ b/elsif.rb",
"@@ -1,3 +0,0 @@",
"-if bar",
"- foo()",
"-end"
],
2016-11-02 22:32:46 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "3c79699074347065dc50d414845fc7dada45dc0e..291c23618b5574de7402f710d7feba58b0edbcc2"
2016-11-02 22:32:46 +03:00
}]