mirror of
https://github.com/github/semantic.git
synced 2024-12-25 16:02:43 +03:00
497 lines
16 KiB
JSON
497 lines
16 KiB
JSON
[{
|
|
"testCaseDescription": "go-const-with-implicit-values-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index e69de29..7905807 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "846ed3173524819c06f22c2a6c997d8a1a137e2e..015bf2cad5d8bf91d829f66076430680ca9461ba"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'zero' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'iota' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'one' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'two' variable in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index 7905807..d98ee4c 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -1,5 +1,9 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+const (",
|
|
"+ zero = iota",
|
|
"+ one",
|
|
"+ two",
|
|
"+ )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "015bf2cad5d8bf91d829f66076430680ca9461ba..11ed532a170a5e67298be9a8357fc1ea3050f725"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
2
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
2
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
2
|
|
],
|
|
"end": [
|
|
6,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
2
|
|
],
|
|
"end": [
|
|
6,
|
|
3
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'one' identifier with the 'b' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
2
|
|
],
|
|
"end": [
|
|
7,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
2
|
|
],
|
|
"end": [
|
|
7,
|
|
3
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'two' identifier with the 'c' identifier in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index d98ee4c..c4c9127 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -2,8 +2,8 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" const (",
|
|
"- zero = iota",
|
|
"- one",
|
|
"- two",
|
|
"+ a = iota",
|
|
"+ b",
|
|
"+ c",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "11ed532a170a5e67298be9a8357fc1ea3050f725..c56390b128feef7791530f330db0d3dbb27c8422"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
2
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
2
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
2
|
|
],
|
|
"end": [
|
|
6,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
2
|
|
],
|
|
"end": [
|
|
6,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'one' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
2
|
|
],
|
|
"end": [
|
|
7,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
2
|
|
],
|
|
"end": [
|
|
7,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'c' identifier with the 'two' identifier in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index c4c9127..d98ee4c 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -2,8 +2,8 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" const (",
|
|
"- a = iota",
|
|
"- b",
|
|
"- c",
|
|
"+ zero = iota",
|
|
"+ one",
|
|
"+ two",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "c56390b128feef7791530f330db0d3dbb27c8422..f894f8ca2eae94fa27e517c64904a10dc1adcb62"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'iota' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'two' variable in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index d98ee4c..7905807 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -1,9 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-const (",
|
|
"- zero = iota",
|
|
"- one",
|
|
"- two",
|
|
"- )",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "f894f8ca2eae94fa27e517c64904a10dc1adcb62..fd4e4bb7526c0bafb057d013b8bc74b0b7e28da2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "fd4e4bb7526c0bafb057d013b8bc74b0b7e28da2..eef5bc42343eb960bad38089de69fe60a46d8244"
|
|
}]
|