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-05 17:08:28 -05:00

419 lines
14 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": "76bcdd875f780855cc6dff6a6e525c997eddbac1..8ad268325c70179fb885600546492a7f16e8f235"
}
,{
"testCaseDescription": "go-array-with-implicit-length-insert-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
29
]
}
},
"summary": "Added the 'a1' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
29
]
}
},
"summary": "Added the '[...]int' variable 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": "8ad268325c70179fb885600546492a7f16e8f235..e7f4351eb678861323b087ccf117b5d1765da1f1"
}
,{
"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 struct of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
24
],
"end": [
4,
25
]
},
{
"start": [
4,
23
],
"end": [
4,
24
]
}
]
},
"summary": "Replaced '2' with '5' in the [...]int struct of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
27
],
"end": [
4,
28
]
},
{
"start": [
4,
25
],
"end": [
4,
26
]
}
]
},
"summary": "Replaced '3' with '6' in the [...]int struct 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": "e7f4351eb678861323b087ccf117b5d1765da1f1..f70b14a28d810d0b2f6ce94c9fe88ad1ddbcac71"
}
,{
"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 struct of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
23
],
"end": [
4,
24
]
},
{
"start": [
4,
24
],
"end": [
4,
25
]
}
]
},
"summary": "Replaced '5' with '2' in the [...]int struct of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
25
],
"end": [
4,
26
]
},
{
"start": [
4,
27
],
"end": [
4,
28
]
}
]
},
"summary": "Replaced '6' with '3' in the [...]int struct 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": "f70b14a28d810d0b2f6ce94c9fe88ad1ddbcac71..a43b52734673ad2bbb5866917161d538270ccedc"
}
,{
"testCaseDescription": "go-array-with-implicit-length-delete-insert-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
29
]
}
},
"summary": "Deleted the 'a1' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
29
]
}
},
"summary": "Deleted the '[...]int' variable 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": "a43b52734673ad2bbb5866917161d538270ccedc..e62f33662236ab1656e184831fcbabc79ed60698"
}
,{
"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": "e62f33662236ab1656e184831fcbabc79ed60698..448e795784d1aee1d1cf28bd856fbb68936b4c5d"
}]