1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00
semantic/test/corpus/diff-summaries/go/short-var-declarations.json

473 lines
15 KiB
JSON
Raw Normal View History

2016-11-02 17:50:05 +03:00
[{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-short-var-declarations-setup-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 23:46:17 +03:00
1
2016-11-02 17:50:05 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'main' module"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"index e69de29..7905807 100644",
2016-11-11 00:19:53 +03:00
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "62d02f1a139bbe83809ce9236632f21ebe34f54b..fc4577f9afeb99f1285df74273d7efdb739f64fc"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-short-var-declarations-insert-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
2016-11-11 00:19:53 +03:00
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-11 00:19:53 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-11 00:19:53 +03:00
13
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'a' variable in the main function of the 'main' module"
2016-11-11 00:19:53 +03:00
},
{
"span": {
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-11 00:19:53 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-11 00:19:53 +03:00
13
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'b' variable in the main function of the 'main' module"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"index 7905807..4ca1ce3 100644",
2016-11-11 00:19:53 +03:00
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
2016-11-11 00:19:53 +03:00
"+a, b := 1, 2",
2016-12-02 00:03:52 +03:00
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "fc4577f9afeb99f1285df74273d7efdb739f64fc..d6eeb71d5fcaea867ef89bed9b9f7f3c8b52304e"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-short-var-declarations-replacement-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
2
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
2
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x variable of the 'main' function"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
9
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
10
2016-11-02 17:50:05 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
9
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
10
2016-11-02 17:50:05 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced '1' with '3' in the x variable of the 'main' function"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
4
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
5
2016-11-02 17:50:05 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
4
2016-11-02 21:37:30 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
5
2016-11-02 21:37:30 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y variable of the 'main' function"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
12
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
13
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
12
2016-11-02 21:37:30 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced '2' with '4' in the y variable of the 'main' function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"index 4ca1ce3..bbbf937 100644",
2016-11-11 00:19:53 +03:00
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a, b := 1, 2",
"+x, y := 3, 4",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "d6eeb71d5fcaea867ef89bed9b9f7f3c8b52304e..ff1cc1ef707b64b2c595e81e68ed5a16bc13fbed"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-short-var-declarations-delete-replacement-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
2
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
2
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a variable of the 'main' function"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
9
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
10
2016-11-02 17:50:05 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
9
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
10
2016-11-02 17:50:05 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced '3' with '1' in the a variable of the 'main' function"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
4
2016-11-02 21:37:30 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
5
2016-11-02 21:37:30 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
4
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 23:46:17 +03:00
5
2016-11-02 21:37:30 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b variable of the 'main' function"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
12
2016-11-02 21:37:30 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
12
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced '4' with '2' in the b variable of the 'main' function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"index bbbf937..4ca1ce3 100644",
2016-11-11 00:19:53 +03:00
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
"-x, y := 3, 4",
2016-12-02 00:03:52 +03:00
"+a, b := 1, 2",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "ff1cc1ef707b64b2c595e81e68ed5a16bc13fbed..64b7150db0e17fd0694be9b8cf40c6695d9cb56e"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-short-var-declarations-delete-insert-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
2016-11-11 00:19:53 +03:00
"delete": {
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-11 00:19:53 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-11 00:19:53 +03:00
13
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'a' variable in the main function of the 'main' module"
2016-11-11 00:19:53 +03:00
},
{
"span": {
"delete": {
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-11 00:19:53 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-11 00:19:53 +03:00
13
]
}
2016-11-02 17:50:05 +03:00
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'b' variable in the main function of the 'main' module"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"index 4ca1ce3..7905807 100644",
2016-11-11 00:19:53 +03:00
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
"-a, b := 1, 2",
2016-12-02 00:03:52 +03:00
"+",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "64b7150db0e17fd0694be9b8cf40c6695d9cb56e..56bae34f0829cdf9e99f54544b2bbbe0c3675ad5"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-short-var-declarations-teardown-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 23:46:17 +03:00
1
2016-11-02 17:50:05 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'main' module"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"index 7905807..e69de29 100644",
2016-11-11 00:19:53 +03:00
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "56bae34f0829cdf9e99f54544b2bbbe0c3675ad5..3c758d5dbcbd39e871113d740f42b6641d3e752a"
2016-11-02 17:50:05 +03:00
}]