2016-11-02 04:36:43 +03:00
|
|
|
[{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-setup-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"slice-literals.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-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-12-02 00:03:52 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +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
|
|
|
"slice-literals.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/slice-literals.go b/slice-literals.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index e69de29..7905807 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.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": "8c40ae41cd9d77cf85279257ca49f9199dfdc64f..2d07af164900799314b58e0cd8823e9fb47bcca8"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-insert-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
2016-12-07 23:41:28 +03:00
|
|
|
"changes": {
|
|
|
|
"slice-literals.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
4,
|
2017-01-10 23:09:09 +03:00
|
|
|
7
|
2016-12-07 23:41:28 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-10 23:09:09 +03:00
|
|
|
"summary": "Added the 's1' var assignment in the main function of the 'main' module"
|
2016-12-07 23:41:28 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
5,
|
2017-01-10 23:09:09 +03:00
|
|
|
7
|
2016-12-07 23:41:28 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-10 23:09:09 +03:00
|
|
|
"summary": "Added the 's2' var assignment in the main function of the 'main' module"
|
2016-12-07 23:41:28 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
6,
|
2017-01-10 23:09:09 +03:00
|
|
|
7
|
2016-12-07 23:41:28 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
9,
|
|
|
|
2
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-10 23:09:09 +03:00
|
|
|
"summary": "Added the 's3' var assignment in the main function of the 'main' module"
|
2016-12-07 23:41:28 +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
|
|
|
"slice-literals.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/slice-literals.go b/slice-literals.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index 7905807..3c94936 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,5 +1,10 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"-",
|
2016-11-11 00:19:53 +03:00
|
|
|
"+const s1 = []string{}",
|
|
|
|
"+const s2 = []string{\"hi\"}",
|
|
|
|
"+const s3 = []string{",
|
|
|
|
"+\"hi\",",
|
|
|
|
"+ \"hello\",",
|
|
|
|
"+}",
|
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": "2d07af164900799314b58e0cd8823e9fb47bcca8..0e11630345fcb8119f3ad82b4333004854769473"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-11-02 21:37:30 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-replacement-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
2016-12-07 23:41:28 +03:00
|
|
|
"changes": {
|
|
|
|
"slice-literals.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
4,
|
|
|
|
21
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the \"sup\" string in the []string struct of the 'main' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
21
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
25
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
21
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
28
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the \"hi\" string with the \"hello\" string in the []string struct of the 'main' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
7,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
7,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
7,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
7,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the \"hi\" string with the \"bar\" string in the []string struct of the 'main' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
8,
|
|
|
|
2
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
8,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
8,
|
|
|
|
2
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
8,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the \"hello\" string with the \"baz\" string in the []string struct of the 'main' function"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-02 04:36:43 +03:00
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
2016-11-02 21:37:30 +03:00
|
|
|
"slice-literals.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/slice-literals.go b/slice-literals.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index 3c94936..caefc00 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,10 +1,10 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
2016-11-11 00:19:53 +03:00
|
|
|
"-const s1 = []string{}",
|
|
|
|
"-const s2 = []string{\"hi\"}",
|
|
|
|
"+const s1 = []string{\"sup\"}",
|
|
|
|
"+const s2 = []string{\"hello\"}",
|
|
|
|
" const s3 = []string{",
|
|
|
|
"-\"hi\",",
|
|
|
|
"- \"hello\",",
|
|
|
|
"+\"bar\",",
|
|
|
|
"+ \"baz\",",
|
|
|
|
" }",
|
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": "0e11630345fcb8119f3ad82b4333004854769473..704a53477a33f2b547fce7d6ad6a6b938ec1fc50"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-11-02 21:37:30 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-delete-replacement-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
2016-12-07 23:41:28 +03:00
|
|
|
"changes": {
|
|
|
|
"slice-literals.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
4,
|
|
|
|
21
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the \"sup\" string in the []string struct of the 'main' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
21
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
28
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
21
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
25
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the \"hello\" string with the \"hi\" string in the []string struct of the 'main' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
7,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
7,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
7,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
7,
|
|
|
|
5
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the \"bar\" string with the \"hi\" string in the []string struct of the 'main' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
8,
|
|
|
|
2
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
8,
|
|
|
|
7
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
8,
|
|
|
|
2
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
8,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the \"baz\" string with the \"hello\" string in the []string struct of the 'main' function"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
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
|
|
|
"slice-literals.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/slice-literals.go b/slice-literals.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index caefc00..3c94936 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,10 +1,10 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
2016-11-11 00:19:53 +03:00
|
|
|
"-const s1 = []string{\"sup\"}",
|
|
|
|
"-const s2 = []string{\"hello\"}",
|
2016-12-02 00:03:52 +03:00
|
|
|
"+const s1 = []string{}",
|
|
|
|
"+const s2 = []string{\"hi\"}",
|
|
|
|
" const s3 = []string{",
|
2016-11-11 00:19:53 +03:00
|
|
|
"-\"bar\",",
|
|
|
|
"- \"baz\",",
|
2016-12-02 00:03:52 +03:00
|
|
|
"+\"hi\",",
|
|
|
|
"+ \"hello\",",
|
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": "704a53477a33f2b547fce7d6ad6a6b938ec1fc50..4394c795432dde95e5e42093611122a9fedb466e"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-delete-insert-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
2016-12-07 23:41:28 +03:00
|
|
|
"changes": {
|
|
|
|
"slice-literals.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
4,
|
2017-01-10 23:09:09 +03:00
|
|
|
7
|
2016-12-07 23:41:28 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-10 23:09:09 +03:00
|
|
|
"summary": "Deleted the 's1' var assignment in the main function of the 'main' module"
|
2016-12-07 23:41:28 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
5,
|
2017-01-10 23:09:09 +03:00
|
|
|
7
|
2016-12-07 23:41:28 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-10 23:09:09 +03:00
|
|
|
"summary": "Deleted the 's2' var assignment in the main function of the 'main' module"
|
2016-12-07 23:41:28 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
6,
|
2017-01-10 23:09:09 +03:00
|
|
|
7
|
2016-12-07 23:41:28 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
9,
|
|
|
|
2
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-10 23:09:09 +03:00
|
|
|
"summary": "Deleted the 's3' var assignment in the main function of the 'main' module"
|
2016-12-07 23:41:28 +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
|
|
|
"slice-literals.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/slice-literals.go b/slice-literals.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index 3c94936..7905807 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"@@ -1,10 +1,5 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
2016-11-11 00:19:53 +03:00
|
|
|
"-const s1 = []string{}",
|
|
|
|
"-const s2 = []string{\"hi\"}",
|
|
|
|
"-const s3 = []string{",
|
|
|
|
"-\"hi\",",
|
|
|
|
"- \"hello\",",
|
|
|
|
"-}",
|
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": "4394c795432dde95e5e42093611122a9fedb466e..ec800f0e913e0787cb44a90309c9771046123137"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-12-02 00:03:52 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-teardown-test",
|
2016-11-02 04:36:43 +03:00
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"slice-literals.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-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-12-02 00:03:52 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +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
|
|
|
"slice-literals.go"
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/slice-literals.go b/slice-literals.go",
|
2016-12-02 00:03:52 +03:00
|
|
|
"index 7905807..e69de29 100644",
|
2016-11-11 00:19:53 +03:00
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.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": "ec800f0e913e0787cb44a90309c9771046123137..e66634fd3bfcf7d9886d619435b9973dde0e7ac9"
|
2016-11-02 04:36:43 +03:00
|
|
|
}]
|