mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
434 lines
14 KiB
JSON
434 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": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 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 e69de29b..79058077 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": "576026694b333d8935d7a3e88a32dbd0ed0b3fa4..e880dbc369823d4b5c4e1643d1301395af59040b"
|
|
}
|
|
,{
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"array-with-implicit-length.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
|
|
"index 79058077..a53dc8c5 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": "e880dbc369823d4b5c4e1643d1301395af59040b..b5893374f1fc215bc0e9639fbff6745b22594bc0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-array-with-implicit-length-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"array-with-implicit-length.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
21
|
|
],
|
|
"end": [
|
|
4,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '4' in the [...]int composite_literal of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
21
|
|
],
|
|
"end": [
|
|
4,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
23
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '1' with '5' in the [...]int composite_literal of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
25
|
|
],
|
|
"end": [
|
|
4,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '6' in the [...]int composite_literal of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
24
|
|
],
|
|
"end": [
|
|
4,
|
|
25
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '2' in the [...]int composite_literal of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
27
|
|
],
|
|
"end": [
|
|
4,
|
|
28
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '3' in the [...]int composite_literal 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 a53dc8c5..e9e3d08f 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": "b5893374f1fc215bc0e9639fbff6745b22594bc0..235fa8a9d47005f230e6db96c1d2bf4d8e935851"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-array-with-implicit-length-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"array-with-implicit-length.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
21
|
|
],
|
|
"end": [
|
|
4,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1' in the [...]int composite_literal of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
24
|
|
],
|
|
"end": [
|
|
4,
|
|
25
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '2' in the [...]int composite_literal of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
27
|
|
],
|
|
"end": [
|
|
4,
|
|
28
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '3' in the [...]int composite_literal of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
21
|
|
],
|
|
"end": [
|
|
4,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '4' in the [...]int composite_literal of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
23
|
|
],
|
|
"end": [
|
|
4,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '5' in the [...]int composite_literal of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
25
|
|
],
|
|
"end": [
|
|
4,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '6' in the [...]int composite_literal 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 e9e3d08f..a53dc8c5 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": "235fa8a9d47005f230e6db96c1d2bf4d8e935851..2dce176e86c49d2fd4be864e3a388ac25674f9d1"
|
|
}
|
|
,{
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"array-with-implicit-length.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
|
|
"index a53dc8c5..79058077 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": "2dce176e86c49d2fd4be864e3a388ac25674f9d1..b98fb6db21b918f40b3caf936b11bb72c07cb9dd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-array-with-implicit-length-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"array-with-implicit-length.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 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 79058077..e69de29b 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": "b98fb6db21b918f40b3caf936b11bb72c07cb9dd..b8e41392436d04ec37de7c7358f5c6f016fc7726"
|
|
}]
|