2016-11-02 04:36:43 +03:00
|
|
|
[{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-grouped-var-declarations-setup-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go": [
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
2016-11-02 21:37:30 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Added the 'main' module"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
]
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
|
|
|
"errors": {}
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
"filePaths": [
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index e69de29..7905807 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/grouped-var-declarations.go",
|
|
|
|
"+++ b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -0,0 +1,5 @@",
|
|
|
|
"+package main",
|
|
|
|
"+",
|
|
|
|
"+func main() {",
|
|
|
|
"+",
|
|
|
|
"+}"
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-10 23:09:09 +03:00
|
|
|
"shas": "bf29cdad5b2bfc24cb06ca4da3a26399623d0ef3..c68f552144c639c604fae4d43a9b09eeb7dded31"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-grouped-var-declarations-insert-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go": [
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 23:46:17 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-02 23:46:17 +03:00
|
|
|
2
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Added the 'zero' variable in the main function of the 'main' module"
|
2016-11-02 23:46:17 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
2016-11-02 23:46:17 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-02 23:46:17 +03:00
|
|
|
2
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Added the 'one' variable in the main function of the 'main' module"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
]
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
|
|
|
"errors": {}
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
"filePaths": [
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index 7905807..cdb45b3 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/grouped-var-declarations.go",
|
|
|
|
"+++ b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,5 +1,8 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"-",
|
2016-11-11 00:19:53 +03:00
|
|
|
"+var (",
|
|
|
|
"+zero = 0",
|
|
|
|
"+one = 1",
|
|
|
|
"+)",
|
2016-12-02 00:03:52 +03:00
|
|
|
" }"
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-10 23:09:09 +03:00
|
|
|
"shas": "c68f552144c639c604fae4d43a9b09eeb7dded31..8a7843b1d27694b01d3e2a269e7bdfa2e0245cda"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-grouped-var-declarations-replacement-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go": [
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
2016-11-02 21:37:30 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
|
|
|
5
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
2016-11-02 21:37:30 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable of the 'main' function"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-02 21:37:30 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
4
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-02 21:37:30 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b variable of the 'main' function"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index cdb45b3..806a593 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/grouped-var-declarations.go",
|
|
|
|
"+++ b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -2,7 +2,7 @@ package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
2016-11-11 00:19:53 +03:00
|
|
|
" var (",
|
2016-12-02 00:03:52 +03:00
|
|
|
"-zero = 0",
|
|
|
|
"-one = 1",
|
|
|
|
"+a = 0",
|
|
|
|
"+b = 1",
|
2016-11-11 00:19:53 +03:00
|
|
|
" )",
|
2016-12-02 00:03:52 +03:00
|
|
|
" }"
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-10 23:09:09 +03:00
|
|
|
"shas": "8a7843b1d27694b01d3e2a269e7bdfa2e0245cda..1eb39a5ff6f0e2c20fd1b5d8a867e4c1c1927408"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-grouped-var-declarations-delete-replacement-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go": [
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
2016-11-02 21:37:30 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
2016-11-02 21:37:30 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
5,
|
|
|
|
5
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable of the 'main' function"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-02 21:37:30 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-02 21:37:30 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
|
|
|
4
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one variable of the 'main' function"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index 806a593..cdb45b3 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/grouped-var-declarations.go",
|
|
|
|
"+++ b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -2,7 +2,7 @@ package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
2016-11-11 00:19:53 +03:00
|
|
|
" var (",
|
|
|
|
"-a = 0",
|
|
|
|
"-b = 1",
|
2016-12-02 00:03:52 +03:00
|
|
|
"+zero = 0",
|
|
|
|
"+one = 1",
|
2016-11-11 00:19:53 +03:00
|
|
|
" )",
|
2016-12-02 00:03:52 +03:00
|
|
|
" }"
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-10 23:09:09 +03:00
|
|
|
"shas": "1eb39a5ff6f0e2c20fd1b5d8a867e4c1c1927408..153dc79270b73da12806bbf4e4d10592166d81fe"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-grouped-var-declarations-delete-insert-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go": [
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-02 23:35:38 +03:00
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-12-02 00:03:52 +03:00
|
|
|
4,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
7,
|
2016-11-02 23:35:38 +03:00
|
|
|
2
|
2016-11-02 21:37:30 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
]
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
|
|
|
"errors": {}
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
"filePaths": [
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index cdb45b3..7905807 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/grouped-var-declarations.go",
|
|
|
|
"+++ b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,8 +1,5 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"-var (",
|
2016-11-11 00:19:53 +03:00
|
|
|
"-zero = 0",
|
|
|
|
"-one = 1",
|
|
|
|
"-)",
|
2016-12-02 00:03:52 +03:00
|
|
|
"+",
|
|
|
|
" }"
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-10 23:09:09 +03:00
|
|
|
"shas": "153dc79270b73da12806bbf4e4d10592166d81fe..5b4d4aec787ec49db73e947102441b92cdd4de92"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-grouped-var-declarations-teardown-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go": [
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-12-02 00:03:52 +03:00
|
|
|
6,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
2016-11-02 21:37:30 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-12-02 00:03:52 +03:00
|
|
|
"summary": "Deleted the 'main' module"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
]
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
|
|
|
"errors": {}
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
"filePaths": [
|
2016-11-02 21:37:30 +03:00
|
|
|
"grouped-var-declarations.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index 7905807..e69de29 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/grouped-var-declarations.go",
|
|
|
|
"+++ b/grouped-var-declarations.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,5 +0,0 @@",
|
|
|
|
"-package main",
|
|
|
|
"-",
|
|
|
|
"-func main() {",
|
|
|
|
"-",
|
|
|
|
"-}"
|
2016-11-11 00:19:53 +03:00
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-10 23:09:09 +03:00
|
|
|
"shas": "5b4d4aec787ec49db73e947102441b92cdd4de92..6cdbe37a0ee09dc49c8870d3e6d87c2a367cc5ff"
|
2016-11-02 04:36:43 +03:00
|
|
|
}]
|