mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
419 lines
14 KiB
JSON
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": "2c5a9495a39900c87b81fb738ec167f87f874be5..eaef77fe3880df6e72b87244ef4a8190f9cfdccc"
|
|
}
|
|
,{
|
|
"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": "eaef77fe3880df6e72b87244ef4a8190f9cfdccc..88db9af842ffe66c6d98d94597a51c3eb9f1f518"
|
|
}
|
|
,{
|
|
"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": "88db9af842ffe66c6d98d94597a51c3eb9f1f518..b11993abfd02ee30d18ae474148d0196f044316a"
|
|
}
|
|
,{
|
|
"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": "b11993abfd02ee30d18ae474148d0196f044316a..7d85956c89e79b98291a20e79705e4b6496afa01"
|
|
}
|
|
,{
|
|
"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": "7d85956c89e79b98291a20e79705e4b6496afa01..14de5399af940a4bf12d6a0b74c88df39ed5b442"
|
|
}
|
|
,{
|
|
"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": "14de5399af940a4bf12d6a0b74c88df39ed5b442..3b9170c77cc9aa221e72b56866d5b07d9d55c2a0"
|
|
}]
|