1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/go/array-with-implicit-length.json
2017-01-10 16:08:59 -05:00

395 lines
13 KiB
JSON

[{
"testCaseDescription": "go-array-with-implicit-length-setup-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index e69de29..7905807 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "38361203f4ad2012388c72c817c638cf2afbc6af..4c7f38543f775f639b8f99f121ce7a08848d5d59"
}
,{
"testCaseDescription": "go-array-with-implicit-length-insert-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"insert": {
"start": [
4,
7
],
"end": [
4,
29
]
}
},
"summary": "Added the 'a1' var assignment in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index 7905807..a53dc8c 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+const a1 = [...]int{1, 2, 3}",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "4c7f38543f775f639b8f99f121ce7a08848d5d59..f507e23cbc43c40044daa73db50295c2d6f302e2"
}
,{
"testCaseDescription": "go-array-with-implicit-length-replacement-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"replace": [
{
"start": [
4,
21
],
"end": [
4,
22
]
},
{
"start": [
4,
21
],
"end": [
4,
22
]
}
]
},
"summary": "Replaced '1' with '4' in the [...]int array of the 'main' function"
},
{
"span": {
"insert": {
"start": [
4,
23
],
"end": [
4,
24
]
}
},
"summary": "Added '5' in the [...]int array of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
24
],
"end": [
4,
25
]
},
{
"start": [
4,
25
],
"end": [
4,
26
]
}
]
},
"summary": "Replaced '2' with '6' in the [...]int array of the 'main' function"
},
{
"span": {
"delete": {
"start": [
4,
27
],
"end": [
4,
28
]
}
},
"summary": "Deleted '3' in the [...]int array of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index a53dc8c..e9e3d08 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const a1 = [...]int{1, 2, 3}",
"+const a1 = [...]int{4,5,6}",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f507e23cbc43c40044daa73db50295c2d6f302e2..f771c1f1f40a4bb0b0ba67736bc75b08ba225f57"
}
,{
"testCaseDescription": "go-array-with-implicit-length-delete-replacement-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"replace": [
{
"start": [
4,
21
],
"end": [
4,
22
]
},
{
"start": [
4,
21
],
"end": [
4,
22
]
}
]
},
"summary": "Replaced '4' with '1' in the [...]int array of the 'main' function"
},
{
"span": {
"insert": {
"start": [
4,
24
],
"end": [
4,
25
]
}
},
"summary": "Added '2' in the [...]int array of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
23
],
"end": [
4,
24
]
},
{
"start": [
4,
27
],
"end": [
4,
28
]
}
]
},
"summary": "Replaced '5' with '3' in the [...]int array of the 'main' function"
},
{
"span": {
"delete": {
"start": [
4,
25
],
"end": [
4,
26
]
}
},
"summary": "Deleted '6' in the [...]int array of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index e9e3d08..a53dc8c 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const a1 = [...]int{4,5,6}",
"+const a1 = [...]int{1, 2, 3}",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f771c1f1f40a4bb0b0ba67736bc75b08ba225f57..4bc541f46c1e820aea1c36ab4e91e69832900dee"
}
,{
"testCaseDescription": "go-array-with-implicit-length-delete-insert-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"delete": {
"start": [
4,
7
],
"end": [
4,
29
]
}
},
"summary": "Deleted the 'a1' var assignment in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index a53dc8c..7905807 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const a1 = [...]int{1, 2, 3}",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "4bc541f46c1e820aea1c36ab4e91e69832900dee..afc959729ab1b56446a877581ddd8ac07b782643"
}
,{
"testCaseDescription": "go-array-with-implicit-length-teardown-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index 7905807..e69de29 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "afc959729ab1b56446a877581ddd8ac07b782643..0c5b247d0509945dd9c3406c137536f85a1595ee"
}]