1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00
semantic/test/corpus/diff-summaries/ruby/array.json
2016-11-03 16:02:56 -07:00

474 lines
14 KiB
JSON

[{
"testCaseDescription": "ruby-array-insert-test",
"expectedResult": {
"changes": {
"array.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
11
]
}
},
"summary": "Added the '[ 1, 2, 3]' array"
}
]
},
"errors": {}
},
"filePaths": [
"array.rb"
],
"patch": [
"diff --git a/array.rb b/array.rb",
"index e69de29..a900520 100644",
"--- a/array.rb",
"+++ b/array.rb",
"@@ -0,0 +1 @@",
"+[ 1, 2, 3]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "e8c4c9b4ba151237a0e88d5a650d34ee5a5a1b61..92505afbaea485d23aecf7f8edb66dfad7e17fd8"
}
,{
"testCaseDescription": "ruby-array-replacement-insert-test",
"expectedResult": {
"changes": {
"array.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
16
]
}
},
"summary": "Added the '['a', 'b', 'c']' array"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
11
]
}
},
"summary": "Added the '[ 1, 2, 3]' array"
}
]
},
"errors": {}
},
"filePaths": [
"array.rb"
],
"patch": [
"diff --git a/array.rb b/array.rb",
"index a900520..c3ae0a1 100644",
"--- a/array.rb",
"+++ b/array.rb",
"@@ -1 +1,3 @@",
"+['a', 'b', 'c']",
"+[ 1, 2, 3]",
" [ 1, 2, 3]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "92505afbaea485d23aecf7f8edb66dfad7e17fd8..4f3473df5291027b89f3b4fe9ca1854e49454cc4"
}
,{
"testCaseDescription": "ruby-array-delete-insert-test",
"expectedResult": {
"changes": {
"array.rb": [
{
"span": {
"insert": {
"start": [
1,
3
],
"end": [
1,
4
]
}
},
"summary": "Added '1'"
},
{
"span": {
"insert": {
"start": [
1,
6
],
"end": [
1,
7
]
}
},
"summary": "Added '2'"
},
{
"span": {
"insert": {
"start": [
1,
9
],
"end": [
1,
10
]
}
},
"summary": "Added '3'"
},
{
"span": {
"delete": {
"start": [
1,
2
],
"end": [
1,
5
]
}
},
"summary": "Deleted the 'a' string"
},
{
"span": {
"delete": {
"start": [
1,
7
],
"end": [
1,
10
]
}
},
"summary": "Deleted the 'b' string"
},
{
"span": {
"delete": {
"start": [
1,
12
],
"end": [
1,
15
]
}
},
"summary": "Deleted the 'c' string"
}
]
},
"errors": {}
},
"filePaths": [
"array.rb"
],
"patch": [
"diff --git a/array.rb b/array.rb",
"index c3ae0a1..9d0ec26 100644",
"--- a/array.rb",
"+++ b/array.rb",
"@@ -1,3 +1,3 @@",
"-['a', 'b', 'c']",
"+[ 1, 2, 3]",
" [ 1, 2, 3]",
" [ 1, 2, 3]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "4f3473df5291027b89f3b4fe9ca1854e49454cc4..9def16756eb5f54b2e6b55b6a4cdfeb4a8d5de46"
}
,{
"testCaseDescription": "ruby-array-replacement-test",
"expectedResult": {
"changes": {
"array.rb": [
{
"span": {
"insert": {
"start": [
1,
2
],
"end": [
1,
5
]
}
},
"summary": "Added the 'a' string"
},
{
"span": {
"insert": {
"start": [
1,
7
],
"end": [
1,
10
]
}
},
"summary": "Added the 'b' string"
},
{
"span": {
"insert": {
"start": [
1,
12
],
"end": [
1,
15
]
}
},
"summary": "Added the 'c' string"
},
{
"span": {
"delete": {
"start": [
1,
3
],
"end": [
1,
4
]
}
},
"summary": "Deleted '1'"
},
{
"span": {
"delete": {
"start": [
1,
6
],
"end": [
1,
7
]
}
},
"summary": "Deleted '2'"
},
{
"span": {
"delete": {
"start": [
1,
9
],
"end": [
1,
10
]
}
},
"summary": "Deleted '3'"
}
]
},
"errors": {}
},
"filePaths": [
"array.rb"
],
"patch": [
"diff --git a/array.rb b/array.rb",
"index 9d0ec26..c3ae0a1 100644",
"--- a/array.rb",
"+++ b/array.rb",
"@@ -1,3 +1,3 @@",
"-[ 1, 2, 3]",
"+['a', 'b', 'c']",
" [ 1, 2, 3]",
" [ 1, 2, 3]"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "9def16756eb5f54b2e6b55b6a4cdfeb4a8d5de46..201d96f51f94a1a40acc9278b6adc775bea84b0f"
}
,{
"testCaseDescription": "ruby-array-delete-replacement-test",
"expectedResult": {
"changes": {
"array.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
16
]
}
},
"summary": "Deleted the '['a', 'b', 'c']' array"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
11
]
}
},
"summary": "Deleted the '[ 1, 2, 3]' array"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
16
]
}
},
"summary": "Added the '['a', 'b', 'c']' array"
}
]
},
"errors": {}
},
"filePaths": [
"array.rb"
],
"patch": [
"diff --git a/array.rb b/array.rb",
"index c3ae0a1..102a972 100644",
"--- a/array.rb",
"+++ b/array.rb",
"@@ -1,3 +1,2 @@",
"-['a', 'b', 'c']",
"-[ 1, 2, 3]",
" [ 1, 2, 3]",
"+['a', 'b', 'c']"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "201d96f51f94a1a40acc9278b6adc775bea84b0f..b5284048ab1c80b398b60b7c632c733adde8df2e"
}
,{
"testCaseDescription": "ruby-array-delete-test",
"expectedResult": {
"changes": {
"array.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
11
]
}
},
"summary": "Deleted the '[ 1, 2, 3]' array"
}
]
},
"errors": {}
},
"filePaths": [
"array.rb"
],
"patch": [
"diff --git a/array.rb b/array.rb",
"index 102a972..939152e 100644",
"--- a/array.rb",
"+++ b/array.rb",
"@@ -1,2 +1 @@",
"-[ 1, 2, 3]",
" ['a', 'b', 'c']"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "b5284048ab1c80b398b60b7c632c733adde8df2e..aff7086bf8fd3b7fc3be8f3bd49c41c46a049729"
}
,{
"testCaseDescription": "ruby-array-delete-rest-test",
"expectedResult": {
"changes": {
"array.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
16
]
}
},
"summary": "Deleted the '['a', 'b', 'c']' array"
}
]
},
"errors": {}
},
"filePaths": [
"array.rb"
],
"patch": [
"diff --git a/array.rb b/array.rb",
"index 939152e..e69de29 100644",
"--- a/array.rb",
"+++ b/array.rb",
"@@ -1 +0,0 @@",
"-['a', 'b', 'c']"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "aff7086bf8fd3b7fc3be8f3bd49c41c46a049729..79b196cace027a076f4ba235171fd4f409bdaba9"
}]