1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/go/struct-field-declarations.json

317 lines
9.9 KiB
JSON
Raw Normal View History

[{
"testCaseDescription": "go-struct-field-declarations-setup-test",
"expectedResult": {
"changes": {
"struct-field-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Added the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'main' function"
}
]
},
"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",
"--- 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",
"shas": "244b542c0e2bf25d7dfae41b917158b0975bf7a2..d6ddfa0e71765023f31c7ecf1408b21b2a076cf5"
}
,{
"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"
}
]
},
"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",
"--- 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",
"shas": "d6ddfa0e71765023f31c7ecf1408b21b2a076cf5..6e55260a400dc45521a6b4c73a8746ed5ef001de"
}
,{
"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
]
},
{
"start": [
5,
3
],
"end": [
5,
4
]
}
]
},
"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"
}
]
},
"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",
"--- 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",
"shas": "6e55260a400dc45521a6b4c73a8746ed5ef001de..2119294625a6c25c31a8c4901a7955ac4c1ca96d"
}
,{
"testCaseDescription": "go-struct-field-declarations-delete-replacement-test",
"expectedResult": {
"changes": {
"struct-field-declarations.go": [
{
"span": {
"replace": [
{
"start": [
5,
3
],
"end": [
5,
4
]
},
{
"start": [
5,
3
],
"end": [
5,
2017-01-18 21:01:25 +03:00
8
]
}
]
},
"summary": "Replaced the 'h' identifier with the 'g int' field declaration in the struct {\n g int\n} struct type of the 'main' function"
}
]
},
"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",
"--- 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",
"shas": "2119294625a6c25c31a8c4901a7955ac4c1ca96d..b42adb0f75428729fc24531495aa6b6266ecdf2f"
}
,{
"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"
}
]
},
"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",
"--- 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",
"shas": "b42adb0f75428729fc24531495aa6b6266ecdf2f..0bb6ce3b4b31b8500ceec4f0645332c2dbe5d106"
}
,{
"testCaseDescription": "go-struct-field-declarations-teardown-test",
"expectedResult": {
"changes": {
"struct-field-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'main' module"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'main' function"
}
]
},
"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",
"--- 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",
"shas": "0bb6ce3b4b31b8500ceec4f0645332c2dbe5d106..b8e888c8932be2e5ade4535f987ed1a83a6bde0a"
}]