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": "6062f017a0391db40a8334e9e8b1f6d5680a0aa4..4e6346d25ed3f01e1275b8b7141f4702137e8a87"
}
,{
"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": "4e6346d25ed3f01e1275b8b7141f4702137e8a87..b726d7175d0d035a9f6aba2dbb734cd303d5b030"
}
,{
"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": "b726d7175d0d035a9f6aba2dbb734cd303d5b030..eb2b71b7f87198f55925128226d773cd2f10f29e"
}
,{
"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": "eb2b71b7f87198f55925128226d773cd2f10f29e..9abe65d3c5070ed5321ef7fedaeb07e693f33a4e"
}
,{
"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": "9abe65d3c5070ed5321ef7fedaeb07e693f33a4e..86e74f856dee151242febf42da066765ff1554e4"
}
,{
"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": "86e74f856dee151242febf42da066765ff1554e4..8e3963891495e21f1ae65d7e70a3318144f75eaf"
}]