1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00
semantic/test/corpus/diff-summaries/go/struct-field-declarations.json
2017-01-17 18:55:59 -05:00

317 lines
10 KiB
JSON

[{
"testCaseDescription": "go-struct-field-declarations-setup-test",
"expectedResult": {
"changes": {
"struct-field-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"struct-field-declarations.go"
],
"patch": [
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
"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": "56011732d81168f480e4597a24f27bfb78a5e68f..4df16904a723168db7cadcd648afe51e7ec82608"
}
,{
"testCaseDescription": "go-struct-field-declarations-insert-test",
"expectedResult": {
"changes": {
"struct-field-declarations.go": [
{
"span": {
"insert": {
"start": [
5,
3
],
"end": [
5,
8
]
}
},
"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",
"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": "4df16904a723168db7cadcd648afe51e7ec82608..74d53a81ff3195692f7666699cdd40e1db362ce9"
}
,{
"testCaseDescription": "go-struct-field-declarations-replacement-test",
"expectedResult": {
"changes": {
"struct-field-declarations.go": [
{
"span": {
"replace": [
{
"start": [
5,
3
],
"end": [
5,
4
]
},
{
"start": [
5,
3
],
"end": [
5,
4
]
}
]
},
"summary": "Replaced the 'g' identifier with the 'h' identifier in the struct {\n h, i int\n} struct type of the 'main' function"
},
{
"span": {
"insert": {
"start": [
5,
6
],
"end": [
5,
7
]
}
},
"summary": "Added the 'i' 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",
"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": "74d53a81ff3195692f7666699cdd40e1db362ce9..7d0560720df0cc335a593e07c6775cfec99e0e92"
}
,{
"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,
4
]
}
]
},
"summary": "Replaced the 'h' identifier with the 'g' identifier in the struct {\n g int\n} struct type of the 'main' function"
},
{
"span": {
"delete": {
"start": [
5,
6
],
"end": [
5,
7
]
}
},
"summary": "Deleted the 'i' identifier 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",
"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": "7d0560720df0cc335a593e07c6775cfec99e0e92..d036a1fce59665335726f5390ef11ba44a8d4441"
}
,{
"testCaseDescription": "go-struct-field-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"struct-field-declarations.go": [
{
"span": {
"delete": {
"start": [
5,
3
],
"end": [
5,
8
]
}
},
"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",
"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": "d036a1fce59665335726f5390ef11ba44a8d4441..5d1e98ee3e94cf5448c11b785d388c93690b1c40"
}
,{
"testCaseDescription": "go-struct-field-declarations-teardown-test",
"expectedResult": {
"changes": {
"struct-field-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"struct-field-declarations.go"
],
"patch": [
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
"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": "5d1e98ee3e94cf5448c11b785d388c93690b1c40..c0b850a2decb3912ab86c57df163fab1731ee208"
}]