1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/go/short-var-declarations.json
2016-12-07 16:12:58 -05:00

473 lines
15 KiB
JSON

[{
"testCaseDescription": "go-short-var-declarations-setup-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index e69de29..7905807 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "6e7cf72f7ca77faa65f54df06a3ed9b0dfb54980..26777dae71ad7b467d17de5dbaef5ebe326a0312"
}
,{
"testCaseDescription": "go-short-var-declarations-insert-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
13
]
}
},
"summary": "Added the 'a' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
13
]
}
},
"summary": "Added the 'b' variable in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 7905807..4ca1ce3 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+a, b := 1, 2",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "26777dae71ad7b467d17de5dbaef5ebe326a0312..5805868e9f74a60616d258fa383d51c6cc8b9673"
}
,{
"testCaseDescription": "go-short-var-declarations-replacement-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
9
],
"end": [
4,
10
]
},
{
"start": [
4,
9
],
"end": [
4,
10
]
}
]
},
"summary": "Replaced '1' with '3' in the x variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
4
],
"end": [
4,
5
]
},
{
"start": [
4,
4
],
"end": [
4,
5
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
12
],
"end": [
4,
13
]
},
{
"start": [
4,
12
],
"end": [
4,
13
]
}
]
},
"summary": "Replaced '2' with '4' in the y variable of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 4ca1ce3..bbbf937 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a, b := 1, 2",
"+x, y := 3, 4",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "5805868e9f74a60616d258fa383d51c6cc8b9673..e569c9ac78ada85bb58b8550b4fe64269599a686"
}
,{
"testCaseDescription": "go-short-var-declarations-delete-replacement-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
9
],
"end": [
4,
10
]
},
{
"start": [
4,
9
],
"end": [
4,
10
]
}
]
},
"summary": "Replaced '3' with '1' in the a variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
4
],
"end": [
4,
5
]
},
{
"start": [
4,
4
],
"end": [
4,
5
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
12
],
"end": [
4,
13
]
},
{
"start": [
4,
12
],
"end": [
4,
13
]
}
]
},
"summary": "Replaced '4' with '2' in the b variable of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index bbbf937..4ca1ce3 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-x, y := 3, 4",
"+a, b := 1, 2",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "e569c9ac78ada85bb58b8550b4fe64269599a686..ec6e60fbf622a591b104023fac651b731d7721eb"
}
,{
"testCaseDescription": "go-short-var-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
13
]
}
},
"summary": "Deleted the 'a' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
13
]
}
},
"summary": "Deleted the 'b' variable in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 4ca1ce3..7905807 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a, b := 1, 2",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "ec6e60fbf622a591b104023fac651b731d7721eb..e846d0abed7495ca231a79d1ca0259363bca3511"
}
,{
"testCaseDescription": "go-short-var-declarations-teardown-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 7905807..e69de29 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "e846d0abed7495ca231a79d1ca0259363bca3511..eedd4cea7ca7eda4bc841d6ac361a3d061a0e875"
}]