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/short-var-declarations.json
2017-01-10 15:09:09 -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": "a5d54e8a2f09c5b25fe5045ee1c159540429d56a..f74e2986af8a77032a5c50a55c3cda05249c814e"
}
,{
"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": "f74e2986af8a77032a5c50a55c3cda05249c814e..4a24db57f42e50a36fa2ac42e69f018fbd505e72"
}
,{
"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": "4a24db57f42e50a36fa2ac42e69f018fbd505e72..a22c5f74d488a409757315c085241b21dca6cb3e"
}
,{
"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": "a22c5f74d488a409757315c085241b21dca6cb3e..6194d8658d6aea9b0e5ed97131b5a2fd0db77b77"
}
,{
"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": "6194d8658d6aea9b0e5ed97131b5a2fd0db77b77..14045f0da23bd52a83fc24aca0c00fdf5a396368"
}
,{
"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": "14045f0da23bd52a83fc24aca0c00fdf5a396368..04bedce4af4de1485a268fc481929a08f010751b"
}]