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-02-07 18:51:15 +03:00
|
|
|
"shas": "244b542c0e2bf25d7dfae41b917158b0975bf7a2..d6ddfa0e71765023f31c7ecf1408b21b2a076cf5"
|
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-02-07 18:51:15 +03:00
|
|
|
"shas": "d6ddfa0e71765023f31c7ecf1408b21b2a076cf5..6e55260a400dc45521a6b4c73a8746ed5ef001de"
|
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-02-07 18:51:15 +03:00
|
|
|
"shas": "6e55260a400dc45521a6b4c73a8746ed5ef001de..2119294625a6c25c31a8c4901a7955ac4c1ca96d"
|
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-02-07 18:51:15 +03:00
|
|
|
"shas": "2119294625a6c25c31a8c4901a7955ac4c1ca96d..b42adb0f75428729fc24531495aa6b6266ecdf2f"
|
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-02-07 18:51:15 +03:00
|
|
|
"shas": "b42adb0f75428729fc24531495aa6b6266ecdf2f..0bb6ce3b4b31b8500ceec4f0645332c2dbe5d106"
|
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-02-07 18:51:15 +03:00
|
|
|
"shas": "0bb6ce3b4b31b8500ceec4f0645332c2dbe5d106..b8e888c8932be2e5ade4535f987ed1a83a6bde0a"
|
2017-01-12 02:18:14 +03:00
|
|
|
}]
|