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/select-statements.json

423 lines
13 KiB
JSON
Raw Normal View History

2016-11-02 21:37:30 +03:00
[{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-select-statements-setup-test",
2016-11-02 21:37:30 +03:00
"expectedResult": {
"changes": {
"select-statements.go": [
{
"span": {
"insert": {
"start": [
2016-11-15 01:47:04 +03:00
1,
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
1
2016-11-02 21:37:30 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'main' module"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
2016-12-02 00:03:52 +03:00
"index e69de29..7905807 100644",
2016-11-11 00:19:53 +03:00
"--- a/select-statements.go",
"+++ b/select-statements.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 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-11 00:21:35 +03:00
"shas": "de859039e83c9bb69eac6fcc05b538a1c6b45e52..f94800376bb0cbf11f832ac1934b1537cf6cdeb3"
2016-11-02 21:37:30 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-select-statements-insert-test",
2016-11-02 21:37:30 +03:00
"expectedResult": {
"changes": {
"select-statements.go": [
{
"span": {
2016-11-11 00:19:53 +03:00
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-15 01:47:04 +03:00
1
2016-11-11 00:19:53 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
13,
2016-11-15 01:47:04 +03:00
2
2016-11-11 00:19:53 +03:00
]
}
2016-11-02 21:37:30 +03:00
},
2016-12-02 00:03:52 +03:00
"summary": "Added a select statement in the main function of the 'main' module"
2016-11-15 01:47:04 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
2016-12-02 00:03:52 +03:00
"index 7905807..6806fa6 100644",
2016-11-15 01:47:04 +03:00
"--- a/select-statements.go",
"+++ b/select-statements.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +1,14 @@",
" package main",
" ",
" func main() {",
"-",
2016-11-15 01:47:04 +03:00
"+select {",
"+ case x := <-c:",
"+ println(x)",
"+ case y <- c:",
"+ println(5)",
"+ case <-time.After(1):",
"+ println(6)",
"+ default:",
"+ return",
"+}",
2016-12-02 00:03:52 +03:00
" }"
2016-11-15 01:47:04 +03:00
],
"gitDir": "test/corpus/repos/go",
2017-01-11 00:21:35 +03:00
"shas": "f94800376bb0cbf11f832ac1934b1537cf6cdeb3..3836f75b7dbf653100d585446e2be7518891252d"
2016-11-15 01:47:04 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-select-statements-replacement-test",
2016-11-15 01:47:04 +03:00
"expectedResult": {
"changes": {
"select-statements.go": [
2016-11-02 21:37:30 +03:00
{
"span": {
2016-11-15 01:47:04 +03:00
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-15 01:47:04 +03:00
8
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-15 01:47:04 +03:00
9
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-15 01:47:04 +03:00
8
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-15 01:47:04 +03:00
9
]
}
]
2016-11-11 00:19:53 +03:00
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'x' identifier with the 'a' identifier in the main function of the 'main' module"
2016-11-11 00:19:53 +03:00
},
{
"span": {
2016-11-15 01:47:04 +03:00
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
7,
2016-11-15 01:47:04 +03:00
8
],
"end": [
2016-12-02 00:03:52 +03:00
7,
2016-11-15 01:47:04 +03:00
9
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
7,
2016-11-15 01:47:04 +03:00
8
],
"end": [
2016-12-02 00:03:52 +03:00
7,
2016-11-15 01:47:04 +03:00
9
]
}
]
2016-11-11 00:19:53 +03:00
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'y' identifier with the 'b' identifier in the main function of the 'main' module"
2016-11-11 00:19:53 +03:00
},
{
"span": {
2016-11-15 01:47:04 +03:00
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
9,
2016-11-15 01:47:04 +03:00
21
],
"end": [
2016-12-02 00:03:52 +03:00
9,
2016-11-15 01:47:04 +03:00
22
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
9,
2016-11-15 01:47:04 +03:00
21
],
"end": [
2016-12-02 00:03:52 +03:00
9,
2016-11-15 01:47:04 +03:00
22
]
}
]
2016-11-02 21:37:30 +03:00
},
2016-12-02 00:07:40 +03:00
"summary": "Replaced '1' with '2' in the time[After](2) function call of the 'main' function"
2016-11-11 00:19:53 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
2016-12-02 00:03:52 +03:00
"index 6806fa6..1ca26fb 100644",
2016-11-11 00:19:53 +03:00
"--- a/select-statements.go",
"+++ b/select-statements.go",
2016-12-02 00:03:52 +03:00
"@@ -2,11 +2,11 @@ package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
" select {",
2016-12-02 00:03:52 +03:00
"- case x := <-c:",
"+ case a := <-c:",
2016-11-11 00:19:53 +03:00
" println(x)",
2016-12-02 00:03:52 +03:00
"- case y <- c:",
"+ case b <- c:",
2016-11-11 00:19:53 +03:00
" println(5)",
2016-12-02 00:03:52 +03:00
"- case <-time.After(1):",
"+ case <-time.After(2):",
2016-11-11 00:19:53 +03:00
" println(6)",
" default:",
" return"
],
"gitDir": "test/corpus/repos/go",
2017-01-11 00:21:35 +03:00
"shas": "3836f75b7dbf653100d585446e2be7518891252d..3474643b08d4cea2d378d9f20a07237260e9f730"
2016-11-11 00:19:53 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-select-statements-delete-replacement-test",
2016-11-11 00:19:53 +03:00
"expectedResult": {
"changes": {
"select-statements.go": [
2016-11-02 21:37:30 +03:00
{
"span": {
2016-11-15 01:47:04 +03:00
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-15 01:47:04 +03:00
8
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-15 01:47:04 +03:00
9
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-15 01:47:04 +03:00
8
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-15 01:47:04 +03:00
9
]
}
]
2016-11-02 21:37:30 +03:00
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'a' identifier with the 'x' identifier in the main function of the 'main' module"
2016-11-02 21:37:30 +03:00
},
{
"span": {
2016-11-15 01:47:04 +03:00
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
7,
2016-11-15 01:47:04 +03:00
8
],
"end": [
2016-12-02 00:03:52 +03:00
7,
2016-11-15 01:47:04 +03:00
9
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
7,
2016-11-15 01:47:04 +03:00
8
],
"end": [
2016-12-02 00:03:52 +03:00
7,
2016-11-15 01:47:04 +03:00
9
]
}
]
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 main function of the 'main' module"
2016-11-02 21:37:30 +03:00
},
2016-11-15 01:47:04 +03:00
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
9,
2016-11-15 01:47:04 +03:00
21
],
"end": [
2016-12-02 00:03:52 +03:00
9,
2016-11-15 01:47:04 +03:00
22
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
9,
2016-11-15 01:47:04 +03:00
21
],
"end": [
2016-12-02 00:03:52 +03:00
9,
2016-11-15 01:47:04 +03:00
22
]
}
]
},
2016-12-02 00:07:40 +03:00
"summary": "Replaced '2' with '1' in the time[After](1) function call of the 'main' function"
2016-11-15 01:47:04 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
2016-12-02 00:03:52 +03:00
"index 1ca26fb..6806fa6 100644",
2016-11-15 01:47:04 +03:00
"--- a/select-statements.go",
"+++ b/select-statements.go",
2016-12-02 00:03:52 +03:00
"@@ -2,11 +2,11 @@ package main",
" ",
" func main() {",
2016-11-15 01:47:04 +03:00
" select {",
"- case a := <-c:",
2016-12-02 00:03:52 +03:00
"+ case x := <-c:",
2016-11-15 01:47:04 +03:00
" println(x)",
2016-12-02 00:03:52 +03:00
"- case b <- c:",
"+ case y <- c:",
2016-11-15 01:47:04 +03:00
" println(5)",
2016-12-02 00:03:52 +03:00
"- case <-time.After(2):",
"+ case <-time.After(1):",
2016-11-15 01:47:04 +03:00
" println(6)",
" default:",
" return"
],
"gitDir": "test/corpus/repos/go",
2017-01-11 00:21:35 +03:00
"shas": "3474643b08d4cea2d378d9f20a07237260e9f730..a96a0db774ab24294c7cf5ceced94944a0ba6bfc"
2016-11-15 01:47:04 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-select-statements-delete-insert-test",
2016-11-15 01:47:04 +03:00
"expectedResult": {
"changes": {
"select-statements.go": [
2016-11-02 21:37:30 +03:00
{
"span": {
2016-11-11 00:19:53 +03:00
"delete": {
2016-11-02 21:37:30 +03:00
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-15 01:47:04 +03:00
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
13,
2016-11-15 01:47:04 +03:00
2
2016-11-02 21:37:30 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted a select statement in the main function of the 'main' module"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
2016-12-02 00:03:52 +03:00
"index 6806fa6..7905807 100644",
2016-11-11 00:19:53 +03:00
"--- a/select-statements.go",
"+++ b/select-statements.go",
2016-12-02 00:03:52 +03:00
"@@ -1,14 +1,5 @@",
" package main",
" ",
" func main() {",
"-select {",
2016-11-11 00:19:53 +03:00
"- case x := <-c:",
"- println(x)",
"- case y <- c:",
"- println(5)",
"- case <-time.After(1):",
"- println(6)",
"- default:",
"- return",
"-}",
2016-12-02 00:03:52 +03:00
"+",
" }"
2016-11-02 21:37:30 +03:00
],
"gitDir": "test/corpus/repos/go",
2017-01-11 00:21:35 +03:00
"shas": "a96a0db774ab24294c7cf5ceced94944a0ba6bfc..69840df62daab5d321a9e0aae7e2bb4bc2de65e9"
2016-11-02 21:37:30 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-select-statements-teardown-test",
2016-11-02 21:37:30 +03:00
"expectedResult": {
"changes": {
"select-statements.go": [
{
"span": {
"delete": {
"start": [
2016-11-15 01:47:04 +03:00
1,
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
1
2016-11-02 21:37:30 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'main' module"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
2016-12-02 00:03:52 +03:00
"index 7905807..e69de29 100644",
2016-11-11 00:19:53 +03:00
"--- a/select-statements.go",
"+++ b/select-statements.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 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-11 00:21:35 +03:00
"shas": "69840df62daab5d321a9e0aae7e2bb4bc2de65e9..f71da83529be4b910d80b2f9bf87cc4aa9f26019"
2016-11-02 21:37:30 +03:00
}]