1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/ruby/assignment.json
2017-01-25 20:27:46 -05:00

348 lines
10 KiB
JSON

[{
"testCaseDescription": "ruby-assignment-insert-test",
"expectedResult": {
"changes": {
"assignment.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Added the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.rb"
],
"patch": [
"diff --git a/assignment.rb b/assignment.rb",
"index e69de29..3aea0c5 100644",
"--- a/assignment.rb",
"+++ b/assignment.rb",
"@@ -0,0 +1 @@",
"+x = 0"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "97513ccc92beee8dc279d44117dce9155e578efe..0bfb74457a0fd6be8afb191deee0bad948bf0492"
}
,{
"testCaseDescription": "ruby-assignment-replacement-insert-test",
"expectedResult": {
"changes": {
"assignment.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Added the 'x' assignment"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
6
]
}
},
"summary": "Added the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.rb"
],
"patch": [
"diff --git a/assignment.rb b/assignment.rb",
"index 3aea0c5..80ff640 100644",
"--- a/assignment.rb",
"+++ b/assignment.rb",
"@@ -1 +1,3 @@",
"+x = 1",
"+x = 0",
" x = 0"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0bfb74457a0fd6be8afb191deee0bad948bf0492..0485661f12dbf56cc0ead739ea960f9a5cd02b12"
}
,{
"testCaseDescription": "ruby-assignment-delete-insert-test",
"expectedResult": {
"changes": {
"assignment.rb": [
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
5
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced '1' with '0' in an assignment to x"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.rb"
],
"patch": [
"diff --git a/assignment.rb b/assignment.rb",
"index 80ff640..e9580bc 100644",
"--- a/assignment.rb",
"+++ b/assignment.rb",
"@@ -1,3 +1,3 @@",
"-x = 1",
"+x = 0",
" x = 0",
" x = 0"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "0485661f12dbf56cc0ead739ea960f9a5cd02b12..70d038e09bfc550c0ea49a8d6efd4a5933fbb067"
}
,{
"testCaseDescription": "ruby-assignment-replacement-test",
"expectedResult": {
"changes": {
"assignment.rb": [
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
5
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced '0' with '1' in an assignment to x"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.rb"
],
"patch": [
"diff --git a/assignment.rb b/assignment.rb",
"index e9580bc..80ff640 100644",
"--- a/assignment.rb",
"+++ b/assignment.rb",
"@@ -1,3 +1,3 @@",
"-x = 0",
"+x = 1",
" x = 0",
" x = 0"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "70d038e09bfc550c0ea49a8d6efd4a5933fbb067..1e0fca806d879ae446160274b0e11986f2698e8e"
}
,{
"testCaseDescription": "ruby-assignment-delete-replacement-test",
"expectedResult": {
"changes": {
"assignment.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'x' assignment"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
6
]
}
},
"summary": "Deleted the 'x' assignment"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
6
]
}
},
"summary": "Added the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.rb"
],
"patch": [
"diff --git a/assignment.rb b/assignment.rb",
"index 80ff640..2465cb3 100644",
"--- a/assignment.rb",
"+++ b/assignment.rb",
"@@ -1,3 +1,2 @@",
"-x = 1",
"-x = 0",
" x = 0",
"+x = 1"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "1e0fca806d879ae446160274b0e11986f2698e8e..5b67a5140d66ec47b6fc638e8d424f45a14b2036"
}
,{
"testCaseDescription": "ruby-assignment-delete-test",
"expectedResult": {
"changes": {
"assignment.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.rb"
],
"patch": [
"diff --git a/assignment.rb b/assignment.rb",
"index 2465cb3..7d4290a 100644",
"--- a/assignment.rb",
"+++ b/assignment.rb",
"@@ -1,2 +1 @@",
"-x = 0",
" x = 1"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "5b67a5140d66ec47b6fc638e8d424f45a14b2036..ae1319ca3c7aef18c9fba00864fe36a3d7338044"
}
,{
"testCaseDescription": "ruby-assignment-delete-rest-test",
"expectedResult": {
"changes": {
"assignment.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.rb"
],
"patch": [
"diff --git a/assignment.rb b/assignment.rb",
"index 7d4290a..e69de29 100644",
"--- a/assignment.rb",
"+++ b/assignment.rb",
"@@ -1 +0,0 @@",
"-x = 1"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "ae1319ca3c7aef18c9fba00864fe36a3d7338044..7eeecdbb471963b09ff71e25f66b66ce9b2b9141"
}]