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/class.json

310 lines
8.4 KiB
JSON
Raw Normal View History

[{
"testCaseDescription": "ruby-class-insert-test",
"expectedResult": {
"changes": {
"class.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Added the 'Foo' class"
}
]
},
"errors": {}
},
"filePaths": [
"class.rb"
],
"patch": [
"diff --git a/class.rb b/class.rb",
"index e69de29..81b916c 100644",
"--- a/class.rb",
"+++ b/class.rb",
"@@ -0,0 +1,3 @@",
"+class Foo < Super",
"+ def test; end",
"+end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "98200bee05decb871fcfdf6858ee954898880f72..b6210fce75b001a4f6dcebfd8977c41c74c55e40"
}
,{
"testCaseDescription": "ruby-class-replacement-insert-test",
"expectedResult": {
"changes": {
"class.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
2016-10-26 20:27:38 +03:00
3,
4
]
}
},
"summary": "Added the 'Foo' class"
2016-10-26 20:27:38 +03:00
},
{
"span": {
"insert": {
"start": [
2016-10-26 20:27:38 +03:00
4,
1
],
"end": [
2016-10-26 20:27:38 +03:00
6,
4
]
}
},
"summary": "Added the 'Foo' class"
}
]
},
"errors": {}
},
"filePaths": [
"class.rb"
],
"patch": [
"diff --git a/class.rb b/class.rb",
"index 81b916c..e67922c 100644",
"--- a/class.rb",
"+++ b/class.rb",
"@@ -1,3 +1,9 @@",
"+class Foo",
"+ def test; end",
"+end",
"+class Foo < Super",
"+ def test; end",
"+end",
" class Foo < Super",
" def test; end",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "b6210fce75b001a4f6dcebfd8977c41c74c55e40..4d8c5346eda3e267a62cbe1cd2da74ff24035f5b"
2016-10-26 20:27:38 +03:00
}
,{
"testCaseDescription": "ruby-class-delete-insert-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"class.rb"
],
"patch": [
"diff --git a/class.rb b/class.rb",
"index e67922c..c371fd8 100644",
"--- a/class.rb",
"+++ b/class.rb",
"@@ -1,4 +1,4 @@",
"-class Foo",
"+class Foo < Super",
" def test; end",
" end",
" class Foo < Super"
],
2016-10-26 20:27:38 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "4d8c5346eda3e267a62cbe1cd2da74ff24035f5b..895b7645a3ad8b26bfb59f814bf914213a1508f8"
}
,{
"testCaseDescription": "ruby-class-replacement-test",
2016-10-26 20:27:38 +03:00
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"class.rb"
],
"patch": [
"diff --git a/class.rb b/class.rb",
"index c371fd8..e67922c 100644",
"--- a/class.rb",
"+++ b/class.rb",
"@@ -1,4 +1,4 @@",
"-class Foo < Super",
"+class Foo",
" def test; end",
" end",
" class Foo < Super"
],
2016-10-26 20:27:38 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "895b7645a3ad8b26bfb59f814bf914213a1508f8..64fd047eef7b0ce2ea5e8746e8d79b3ca8c0ec06"
2016-10-26 20:27:38 +03:00
}
,{
"testCaseDescription": "ruby-class-delete-replacement-test",
"expectedResult": {
"changes": {
"class.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
"summary": "Deleted the 'Foo' class"
2016-10-26 20:27:38 +03:00
},
{
"span": {
"delete": {
"start": [
2016-10-26 20:27:38 +03:00
4,
1
],
"end": [
2016-10-26 20:27:38 +03:00
6,
4
]
}
},
"summary": "Deleted the 'Foo' class"
2016-10-26 20:27:38 +03:00
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
6,
4
]
}
},
"summary": "Added the 'Foo' class"
}
]
},
"errors": {}
},
"filePaths": [
"class.rb"
],
"patch": [
"diff --git a/class.rb b/class.rb",
"index e67922c..818d26a 100644",
"--- a/class.rb",
"+++ b/class.rb",
"@@ -1,9 +1,6 @@",
"-class Foo",
"- def test; end",
"-end",
" class Foo < Super",
" def test; end",
" end",
"-class Foo < Super",
"+class Foo",
" def test; end",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "64fd047eef7b0ce2ea5e8746e8d79b3ca8c0ec06..129ea7453ad876f91980fe45c08f65586d0b082b"
}
,{
"testCaseDescription": "ruby-class-delete-test",
"expectedResult": {
"changes": {
"class.rb": [
{
"span": {
2016-10-26 20:27:38 +03:00
"delete": {
"start": [
1,
1
],
"end": [
3,
4
]
}
},
2016-10-26 20:27:38 +03:00
"summary": "Deleted the 'Foo' class"
}
]
},
"errors": {}
},
"filePaths": [
"class.rb"
],
"patch": [
"diff --git a/class.rb b/class.rb",
"index 818d26a..bab2e9f 100644",
"--- a/class.rb",
"+++ b/class.rb",
"@@ -1,6 +1,3 @@",
"-class Foo < Super",
"- def test; end",
"-end",
" class Foo",
" def test; end",
" end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "129ea7453ad876f91980fe45c08f65586d0b082b..7a054e58466e2a33d7c70bb948497f3b0622b6e5"
}
,{
"testCaseDescription": "ruby-class-delete-rest-test",
"expectedResult": {
"changes": {
"class.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
2016-10-26 20:27:38 +03:00
3,
4
]
}
},
2016-10-26 20:27:38 +03:00
"summary": "Deleted the 'Foo' class"
}
]
},
"errors": {}
},
"filePaths": [
"class.rb"
],
"patch": [
"diff --git a/class.rb b/class.rb",
"index bab2e9f..e69de29 100644",
"--- a/class.rb",
"+++ b/class.rb",
"@@ -1,3 +0,0 @@",
"-class Foo",
"- def test; end",
"-end"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "7a054e58466e2a33d7c70bb948497f3b0622b6e5..5e4ebb1f424a9e273ffc7cc40c76cee1d78b0d77"
}]