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/grouped-var-declarations.json
2017-01-10 15:09:09 -05:00

377 lines
12 KiB
JSON

[{
"testCaseDescription": "go-grouped-var-declarations-setup-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"grouped-var-declarations.go"
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index e69de29..7905807 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "bf29cdad5b2bfc24cb06ca4da3a26399623d0ef3..c68f552144c639c604fae4d43a9b09eeb7dded31"
}
,{
"testCaseDescription": "go-grouped-var-declarations-insert-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
7,
2
]
}
},
"summary": "Added the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
7,
2
]
}
},
"summary": "Added the 'one' variable in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"grouped-var-declarations.go"
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index 7905807..cdb45b3 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -1,5 +1,8 @@",
" package main",
" ",
" func main() {",
"-",
"+var (",
"+zero = 0",
"+one = 1",
"+)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "c68f552144c639c604fae4d43a9b09eeb7dded31..8a7843b1d27694b01d3e2a269e7bdfa2e0245cda"
}
,{
"testCaseDescription": "go-grouped-var-declarations-replacement-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
{
"span": {
"replace": [
{
"start": [
5,
1
],
"end": [
5,
5
]
},
{
"start": [
5,
1
],
"end": [
5,
2
]
}
]
},
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
1
],
"end": [
6,
4
]
},
{
"start": [
6,
1
],
"end": [
6,
2
]
}
]
},
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b variable of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"grouped-var-declarations.go"
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index cdb45b3..806a593 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" var (",
"-zero = 0",
"-one = 1",
"+a = 0",
"+b = 1",
" )",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "8a7843b1d27694b01d3e2a269e7bdfa2e0245cda..1eb39a5ff6f0e2c20fd1b5d8a867e4c1c1927408"
}
,{
"testCaseDescription": "go-grouped-var-declarations-delete-replacement-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
{
"span": {
"replace": [
{
"start": [
5,
1
],
"end": [
5,
2
]
},
{
"start": [
5,
1
],
"end": [
5,
5
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
1
],
"end": [
6,
2
]
},
{
"start": [
6,
1
],
"end": [
6,
4
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one variable of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"grouped-var-declarations.go"
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index 806a593..cdb45b3 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" var (",
"-a = 0",
"-b = 1",
"+zero = 0",
"+one = 1",
" )",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1eb39a5ff6f0e2c20fd1b5d8a867e4c1c1927408..153dc79270b73da12806bbf4e4d10592166d81fe"
}
,{
"testCaseDescription": "go-grouped-var-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
7,
2
]
}
},
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
7,
2
]
}
},
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"grouped-var-declarations.go"
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index cdb45b3..7905807 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -1,8 +1,5 @@",
" package main",
" ",
" func main() {",
"-var (",
"-zero = 0",
"-one = 1",
"-)",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "153dc79270b73da12806bbf4e4d10592166d81fe..5b4d4aec787ec49db73e947102441b92cdd4de92"
}
,{
"testCaseDescription": "go-grouped-var-declarations-teardown-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"grouped-var-declarations.go"
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index 7905807..e69de29 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "5b4d4aec787ec49db73e947102441b92cdd4de92..6cdbe37a0ee09dc49c8870d3e6d87c2a367cc5ff"
}]