2016-11-02 04:36:43 +03:00
|
|
|
[{
|
2016-11-02 21:37:30 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-insert-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
|
|
|
1,
|
2016-11-02 21:37:30 +03:00
|
|
|
22
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's1' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
26
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's2' variable"
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 21:37:30 +03:00
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's3' variable"
|
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",
|
|
|
|
"index e69de29..9b1eb7a 100644",
|
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
|
|
|
"@@ -0,0 +1,6 @@",
|
|
|
|
"+const s1 = []string{}",
|
|
|
|
"+const s2 = []string{\"hi\"}",
|
|
|
|
"+const s3 = []string{",
|
|
|
|
"+\"hi\",",
|
|
|
|
"+ \"hello\",",
|
|
|
|
"+}"
|
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 23:10:04 +03:00
|
|
|
"shas": "d7c85b9aedcbd3af69fdfe6a30e249364113d5e2..e5b39d883ee5c4845c6e84d7c6edec4ba14c5057"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-11-02 21:37:30 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-replacement-insert-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
|
|
|
1,
|
2016-11-02 21:37:30 +03:00
|
|
|
27
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's1' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
29
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's2' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 21:37:30 +03:00
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's3' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 21:37:30 +03:00
|
|
|
22
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's1' variable"
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 21:37:30 +03:00
|
|
|
26
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's2' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
9,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
12,
|
2016-11-02 21:37:30 +03:00
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's3' variable"
|
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",
|
|
|
|
"index 9b1eb7a..4555163 100644",
|
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
|
|
|
"@@ -1,3 +1,15 @@",
|
|
|
|
"+const s1 = []string{\"sup\"}",
|
|
|
|
"+const s2 = []string{\"hello\"}",
|
|
|
|
"+const s3 = []string{",
|
|
|
|
"+\"bar\",",
|
|
|
|
"+ \"baz\",",
|
|
|
|
"+}",
|
|
|
|
"+const s1 = []string{}",
|
|
|
|
"+const s2 = []string{\"hi\"}",
|
|
|
|
"+const s3 = []string{",
|
|
|
|
"+\"hi\",",
|
|
|
|
"+ \"hello\",",
|
|
|
|
"+}",
|
|
|
|
" const s1 = []string{}",
|
|
|
|
" const s2 = []string{\"hi\"}",
|
|
|
|
" const s3 = []string{"
|
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 23:10:04 +03:00
|
|
|
"shas": "e5b39d883ee5c4845c6e84d7c6edec4ba14c5057..e92c35c4e9312dc3a6e804deda19c55347de6e06"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-11-02 21:37:30 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-delete-insert-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": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 22:43:26 +03:00
|
|
|
21
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 22:43:26 +03:00
|
|
|
26
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 22:43:26 +03:00
|
|
|
20
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 22:43:26 +03:00
|
|
|
22
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-11 00:19:53 +03:00
|
|
|
"summary": "Replaced the \"sup\" string with the '{}' literal_value in the s1 variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
21
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 22:43:26 +03:00
|
|
|
28
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
21
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
25
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-11 00:19:53 +03:00
|
|
|
"summary": "Replaced the \"hello\" string with the \"hi\" string in the s2 variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 22:43:26 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 22:43:26 +03:00
|
|
|
6
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 22:43:26 +03:00
|
|
|
1
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 22:43:26 +03:00
|
|
|
5
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-11 00:19:53 +03:00
|
|
|
"summary": "Replaced the \"bar\" string with the \"hi\" string in the s3 variable"
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
2016-11-02 22:43:26 +03:00
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 22:43:26 +03:00
|
|
|
2
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 22:43:26 +03:00
|
|
|
7
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 22:43:26 +03:00
|
|
|
2
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 22:43:26 +03:00
|
|
|
9
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
2016-11-11 00:19:53 +03:00
|
|
|
"summary": "Replaced the \"baz\" string with the \"hello\" string in the s3 variable"
|
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",
|
|
|
|
"index 4555163..39a2067 100644",
|
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
|
|
|
"@@ -1,8 +1,8 @@",
|
|
|
|
"-const s1 = []string{\"sup\"}",
|
|
|
|
"-const s2 = []string{\"hello\"}",
|
|
|
|
"+const s1 = []string{}",
|
|
|
|
"+const s2 = []string{\"hi\"}",
|
|
|
|
" const s3 = []string{",
|
|
|
|
"-\"bar\",",
|
|
|
|
"- \"baz\",",
|
|
|
|
"+\"hi\",",
|
|
|
|
"+ \"hello\",",
|
|
|
|
" }",
|
|
|
|
" const s1 = []string{}",
|
|
|
|
" const s2 = []string{\"hi\"}"
|
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 23:10:04 +03:00
|
|
|
"shas": "e92c35c4e9312dc3a6e804deda19c55347de6e06..4d6e51e7ba29099b0b91915fb889af994eec1795"
|
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": {
|
|
|
|
"changes": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"slice-literals.go": [
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 21:37:30 +03:00
|
|
|
20
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 21:37:30 +03:00
|
|
|
22
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 21:37:30 +03:00
|
|
|
21
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 21:37:30 +03:00
|
|
|
26
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-11 00:19:53 +03:00
|
|
|
"summary": "Replaced the '{}' literal_value with the \"sup\" string in the s1 variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
21
|
2016-11-02 04:36:43 +03:00
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
25
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
21
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 04:36:43 +03:00
|
|
|
28
|
|
|
|
]
|
2016-11-02 21:37:30 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-11 00:19:53 +03:00
|
|
|
"summary": "Replaced the \"hi\" string with the \"hello\" string in the s2 variable"
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 21:37:30 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 21:37:30 +03:00
|
|
|
5
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 21:37:30 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 21:37:30 +03:00
|
|
|
6
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-11 00:19:53 +03:00
|
|
|
"summary": "Replaced the \"hi\" string with the \"bar\" string in the s3 variable"
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 21:37:30 +03:00
|
|
|
2
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 21:37:30 +03:00
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 21:37:30 +03:00
|
|
|
2
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 21:37:30 +03:00
|
|
|
7
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-11 00:19:53 +03:00
|
|
|
"summary": "Replaced the \"hello\" string with the \"baz\" string in the s3 variable"
|
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",
|
|
|
|
"index 39a2067..4555163 100644",
|
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
|
|
|
"@@ -1,8 +1,8 @@",
|
|
|
|
"-const s1 = []string{}",
|
|
|
|
"-const s2 = []string{\"hi\"}",
|
|
|
|
"+const s1 = []string{\"sup\"}",
|
|
|
|
"+const s2 = []string{\"hello\"}",
|
|
|
|
" const s3 = []string{",
|
|
|
|
"-\"hi\",",
|
|
|
|
"- \"hello\",",
|
|
|
|
"+\"bar\",",
|
|
|
|
"+ \"baz\",",
|
|
|
|
" }",
|
|
|
|
" const s1 = []string{}",
|
|
|
|
" const s2 = []string{\"hi\"}"
|
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 23:10:04 +03:00
|
|
|
"shas": "4d6e51e7ba29099b0b91915fb889af994eec1795..079faf0b3b47fde58866875a9a64813bc764950c"
|
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": {
|
|
|
|
"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
|
|
|
1,
|
2016-11-02 21:37:30 +03:00
|
|
|
27
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's1' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
29
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's2' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 21:37:30 +03:00
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's3' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 21:37:30 +03:00
|
|
|
22
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's1' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"delete": {
|
2016-11-02 04:36:43 +03:00
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 21:37:30 +03:00
|
|
|
26
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's2' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"delete": {
|
2016-11-02 04:36:43 +03:00
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
9,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
12,
|
2016-11-02 21:37:30 +03:00
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's3' variable"
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"insert": {
|
2016-11-02 04:36:43 +03:00
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 21:37:30 +03:00
|
|
|
27
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's1' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
2016-11-02 21:37:30 +03:00
|
|
|
"insert": {
|
2016-11-02 04:36:43 +03:00
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 21:37:30 +03:00
|
|
|
29
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's2' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
9,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
12,
|
2016-11-02 21:37:30 +03:00
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Added the 's3' variable"
|
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",
|
|
|
|
"index 4555163..d3fb29c 100644",
|
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
|
|
|
"@@ -1,18 +1,12 @@",
|
|
|
|
"-const s1 = []string{\"sup\"}",
|
|
|
|
"-const s2 = []string{\"hello\"}",
|
|
|
|
"-const s3 = []string{",
|
|
|
|
"-\"bar\",",
|
|
|
|
"- \"baz\",",
|
|
|
|
"-}",
|
|
|
|
" const s1 = []string{}",
|
|
|
|
" const s2 = []string{\"hi\"}",
|
|
|
|
" const s3 = []string{",
|
|
|
|
" \"hi\",",
|
|
|
|
" \"hello\",",
|
|
|
|
" }",
|
|
|
|
"-const s1 = []string{}",
|
|
|
|
"-const s2 = []string{\"hi\"}",
|
|
|
|
"+const s1 = []string{\"sup\"}",
|
|
|
|
"+const s2 = []string{\"hello\"}",
|
|
|
|
" const s3 = []string{",
|
|
|
|
"-\"hi\",",
|
|
|
|
"- \"hello\",",
|
|
|
|
"+\"bar\",",
|
|
|
|
"+ \"baz\",",
|
|
|
|
" }"
|
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 23:10:04 +03:00
|
|
|
"shas": "079faf0b3b47fde58866875a9a64813bc764950c..705764c3224fe96e65bbb4e3ff1e8388e7219783"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-11-02 21:37:30 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-delete-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
|
|
|
1,
|
2016-11-02 21:37:30 +03:00
|
|
|
22
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's1' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
26
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's2' variable"
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 21:37:30 +03:00
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's3' variable"
|
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",
|
|
|
|
"index d3fb29c..e3fd378 100644",
|
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
|
|
|
"@@ -1,9 +1,3 @@",
|
|
|
|
"-const s1 = []string{}",
|
|
|
|
"-const s2 = []string{\"hi\"}",
|
|
|
|
"-const s3 = []string{",
|
|
|
|
"-\"hi\",",
|
|
|
|
"- \"hello\",",
|
|
|
|
"-}",
|
|
|
|
" const s1 = []string{\"sup\"}",
|
|
|
|
" const s2 = []string{\"hello\"}",
|
|
|
|
" const s3 = []string{"
|
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 23:10:04 +03:00
|
|
|
"shas": "705764c3224fe96e65bbb4e3ff1e8388e7219783..70be820be1a032a886aba1efaf386ea20e7e4636"
|
2016-11-02 04:36:43 +03:00
|
|
|
}
|
|
|
|
,{
|
2016-11-02 21:37:30 +03:00
|
|
|
"testCaseDescription": "go-slice-literals-delete-rest-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
|
|
|
1,
|
2016-11-02 21:37:30 +03:00
|
|
|
27
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's1' variable"
|
2016-11-02 04:36:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 21:37:30 +03:00
|
|
|
29
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's2' variable"
|
2016-11-02 21:37:30 +03:00
|
|
|
},
|
2016-11-02 04:36:43 +03:00
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 04:36:43 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 21:37:30 +03:00
|
|
|
2
|
2016-11-02 04:36:43 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-11-02 22:43:26 +03:00
|
|
|
"summary": "Deleted the 's3' variable"
|
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",
|
|
|
|
"index e3fd378..e69de29 100644",
|
|
|
|
"--- a/slice-literals.go",
|
|
|
|
"+++ b/slice-literals.go",
|
|
|
|
"@@ -1,6 +0,0 @@",
|
|
|
|
"-const s1 = []string{\"sup\"}",
|
|
|
|
"-const s2 = []string{\"hello\"}",
|
|
|
|
"-const s3 = []string{",
|
|
|
|
"-\"bar\",",
|
|
|
|
"- \"baz\",",
|
|
|
|
"-}"
|
|
|
|
],
|
2016-11-02 04:36:43 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 23:10:04 +03:00
|
|
|
"shas": "70be820be1a032a886aba1efaf386ea20e7e4636..0fff314fad0973ea89120a1ae3b7940e0f7866d2"
|
2016-11-02 04:36:43 +03:00
|
|
|
}]
|