2017-01-12 02:18:14 +03:00
|
|
|
[{
|
|
|
|
"testCaseDescription": "go-struct-field-declarations-setup-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"struct-field-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2017-01-24 23:09:28 +03:00
|
|
|
1,
|
|
|
|
13
|
2017-01-12 02:18:14 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'main' module"
|
2017-01-24 23:09:28 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
3,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
2
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'main' function"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"struct-field-declarations.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index e69de29b..60d13f45 100644",
|
2017-01-12 02:18:14 +03:00
|
|
|
"--- a/struct-field-declarations.go",
|
|
|
|
"+++ b/struct-field-declarations.go",
|
|
|
|
"@@ -0,0 +1,5 @@",
|
|
|
|
"+package main",
|
|
|
|
"+",
|
|
|
|
"+func main() {",
|
|
|
|
"+ type s3 struct {} ",
|
|
|
|
"+}"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "6062f017a0391db40a8334e9e8b1f6d5680a0aa4..4e6346d25ed3f01e1275b8b7141f4702137e8a87"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-struct-field-declarations-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"struct-field-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Added the 'g int' field declaration in the struct {\n g int\n} struct type of the 'main' function"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"struct-field-declarations.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 60d13f45..bc84b146 100644",
|
2017-01-12 02:18:14 +03:00
|
|
|
"--- a/struct-field-declarations.go",
|
|
|
|
"+++ b/struct-field-declarations.go",
|
|
|
|
"@@ -1,5 +1,7 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"- type s3 struct {} ",
|
|
|
|
"+ type s3 struct {",
|
|
|
|
"+ g int",
|
|
|
|
"+} ",
|
|
|
|
" }"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "4e6346d25ed3f01e1275b8b7141f4702137e8a87..b726d7175d0d035a9f6aba2dbb734cd303d5b030"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-struct-field-declarations-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"struct-field-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
2017-01-18 21:01:25 +03:00
|
|
|
8
|
2017-01-12 02:18:14 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
2017-01-24 23:09:28 +03:00
|
|
|
4
|
2017-01-12 02:18:14 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Replaced the 'g int' field declaration with the 'h' identifier in the struct {\n h, i int\n} struct type of the 'main' function"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"struct-field-declarations.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index bc84b146..f3ca9a51 100644",
|
2017-01-12 02:18:14 +03:00
|
|
|
"--- a/struct-field-declarations.go",
|
|
|
|
"+++ b/struct-field-declarations.go",
|
|
|
|
"@@ -2,6 +2,6 @@ package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
" type s3 struct {",
|
|
|
|
"- g int",
|
|
|
|
"+ h, i int",
|
|
|
|
" } ",
|
|
|
|
" }"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "b726d7175d0d035a9f6aba2dbb734cd303d5b030..eb2b71b7f87198f55925128226d773cd2f10f29e"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-struct-field-declarations-delete-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"struct-field-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
2017-01-24 23:09:28 +03:00
|
|
|
4
|
2017-01-12 02:18:14 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
2017-01-18 21:01:25 +03:00
|
|
|
8
|
2017-01-12 02:18:14 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Replaced the 'h' identifier with the 'g int' field declaration in the struct {\n g int\n} struct type of the 'main' function"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"struct-field-declarations.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index f3ca9a51..bc84b146 100644",
|
2017-01-12 02:18:14 +03:00
|
|
|
"--- a/struct-field-declarations.go",
|
|
|
|
"+++ b/struct-field-declarations.go",
|
|
|
|
"@@ -2,6 +2,6 @@ package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
" type s3 struct {",
|
|
|
|
"- h, i int",
|
|
|
|
"+ g int",
|
|
|
|
" } ",
|
|
|
|
" }"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "eb2b71b7f87198f55925128226d773cd2f10f29e..9abe65d3c5070ed5321ef7fedaeb07e693f33a4e"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-struct-field-declarations-delete-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"struct-field-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
5,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-17 23:26:07 +03:00
|
|
|
"summary": "Deleted the 'g int' field declaration in the struct {} struct type of the 'main' function"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"struct-field-declarations.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index bc84b146..60d13f45 100644",
|
2017-01-12 02:18:14 +03:00
|
|
|
"--- a/struct-field-declarations.go",
|
|
|
|
"+++ b/struct-field-declarations.go",
|
|
|
|
"@@ -1,7 +1,5 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"- type s3 struct {",
|
|
|
|
"- g int",
|
|
|
|
"-} ",
|
|
|
|
"+ type s3 struct {} ",
|
|
|
|
" }"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "9abe65d3c5070ed5321ef7fedaeb07e693f33a4e..86e74f856dee151242febf42da066765ff1554e4"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-struct-field-declarations-teardown-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"struct-field-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2017-01-24 23:09:28 +03:00
|
|
|
1,
|
|
|
|
13
|
2017-01-12 02:18:14 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'main' module"
|
2017-01-24 23:09:28 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
3,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
2
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'main' function"
|
2017-01-12 02:18:14 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"struct-field-declarations.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 60d13f45..e69de29b 100644",
|
2017-01-12 02:18:14 +03:00
|
|
|
"--- a/struct-field-declarations.go",
|
|
|
|
"+++ b/struct-field-declarations.go",
|
|
|
|
"@@ -1,5 +0,0 @@",
|
|
|
|
"-package main",
|
|
|
|
"-",
|
|
|
|
"-func main() {",
|
|
|
|
"- type s3 struct {} ",
|
|
|
|
"-}"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "86e74f856dee151242febf42da066765ff1554e4..8e3963891495e21f1ae65d7e70a3318144f75eaf"
|
2017-01-12 02:18:14 +03:00
|
|
|
}]
|