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

548 lines
17 KiB
JSON
Raw Normal View History

2016-11-02 21:37:30 +03:00
[{
"testCaseDescription": "go-select-statements-insert-test",
"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-11-15 01:47:04 +03:00
10,
2
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-15 01:47:04 +03:00
"summary": "Added a select statement"
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",
"index e69de29..7fe1c0b 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -0,0 +1,10 @@",
"+select {",
"+ case x := <-c:",
"+ println(x)",
"+ case y <- c:",
"+ println(5)",
"+ case <-time.After(1):",
"+ println(6)",
"+ default:",
"+ return",
"+}"
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-22 21:51:11 +03:00
"shas": "6b240253df1166aa2ee11d564e531f38e8da8dca..a67475876d7d3c21f3ad45338fcf148a3246505a"
2016-11-02 21:37:30 +03:00
}
,{
"testCaseDescription": "go-select-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"select-statements.go": [
{
"span": {
2016-11-11 00:19:53 +03:00
"insert": {
"start": [
2016-11-15 01:47:04 +03:00
1,
1
2016-11-11 00:19:53 +03:00
],
"end": [
2016-11-15 01:47:04 +03:00
10,
2
2016-11-11 00:19:53 +03:00
]
}
2016-11-02 21:37:30 +03:00
},
2016-11-15 01:47:04 +03:00
"summary": "Added a select statement"
2016-11-02 21:37:30 +03:00
},
{
"span": {
2016-11-11 00:19:53 +03:00
"insert": {
"start": [
2016-11-15 01:47:04 +03:00
11,
1
2016-11-11 00:19:53 +03:00
],
"end": [
2016-11-15 01:47:04 +03:00
20,
2
2016-11-11 00:19:53 +03:00
]
}
2016-11-02 21:37:30 +03:00
},
2016-11-15 01:47:04 +03:00
"summary": "Added a select statement"
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index 7fe1c0b..1403fc7 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,4 +1,24 @@",
" select {",
"+ case a := <-c:",
"+ println(x)",
"+ case b <- c:",
"+ println(5)",
"+ case <-time.After(2):",
"+ println(6)",
"+ default:",
"+ return",
"+}",
"+select {",
"+ case x := <-c:",
"+ println(x)",
"+ case y <- c:",
"+ println(5)",
"+ case <-time.After(1):",
"+ println(6)",
"+ default:",
"+ return",
"+}",
"+select {",
" case x := <-c:",
" println(x)",
" case y <- c:"
],
"gitDir": "test/corpus/repos/go",
2016-11-22 21:51:11 +03:00
"shas": "a67475876d7d3c21f3ad45338fcf148a3246505a..877d77aedfbcc72add2a467e61ff6bc20966f73b"
2016-11-15 01:47:04 +03:00
}
,{
"testCaseDescription": "go-select-statements-delete-insert-test",
"expectedResult": {
"changes": {
"select-statements.go": [
2016-11-02 21:37:30 +03:00
{
"span": {
2016-11-15 01:47:04 +03:00
"replace": [
{
"start": [
2,
8
],
"end": [
2,
9
]
},
{
"start": [
2,
8
],
"end": [
2,
9
]
}
]
2016-11-11 00:19:53 +03:00
},
2016-11-15 01:47:04 +03:00
"summary": "Replaced the 'a' identifier with the 'x' identifier"
2016-11-11 00:19:53 +03:00
},
{
"span": {
2016-11-15 01:47:04 +03:00
"replace": [
{
"start": [
4,
8
],
"end": [
4,
9
]
},
{
"start": [
4,
8
],
"end": [
4,
9
]
}
]
2016-11-11 00:19:53 +03:00
},
2016-11-15 01:47:04 +03:00
"summary": "Replaced the 'b' identifier with the 'y' identifier"
2016-11-11 00:19:53 +03:00
},
{
"span": {
2016-11-15 01:47:04 +03:00
"replace": [
{
"start": [
6,
21
],
"end": [
6,
22
]
},
{
"start": [
6,
21
],
"end": [
6,
22
]
}
]
2016-11-02 21:37:30 +03:00
},
2016-11-15 01:47:04 +03:00
"summary": "Replaced '2' with '1'"
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-11-15 01:47:04 +03:00
"index 1403fc7..3e83983 100644",
2016-11-11 00:19:53 +03:00
"--- a/select-statements.go",
"+++ b/select-statements.go",
2016-11-15 01:47:04 +03:00
"@@ -1,9 +1,9 @@",
2016-11-11 00:19:53 +03:00
" select {",
"- case a := <-c:",
2016-11-15 01:47:04 +03:00
"+ case x := <-c:",
2016-11-11 00:19:53 +03:00
" println(x)",
2016-11-15 01:47:04 +03:00
"- case b <- c:",
"+ case y <- c:",
2016-11-11 00:19:53 +03:00
" println(5)",
2016-11-15 01:47:04 +03:00
"- case <-time.After(2):",
"+ case <-time.After(1):",
2016-11-11 00:19:53 +03:00
" println(6)",
" default:",
" return"
],
"gitDir": "test/corpus/repos/go",
2016-11-22 21:51:11 +03:00
"shas": "877d77aedfbcc72add2a467e61ff6bc20966f73b..74698df366ccb6ece8715d12898b8fd2283ad628"
2016-11-11 00:19:53 +03:00
}
,{
2016-11-15 01:47:04 +03:00
"testCaseDescription": "go-select-statements-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": [
2,
8
],
"end": [
2,
9
]
},
{
"start": [
2,
8
],
"end": [
2,
9
]
}
]
2016-11-02 21:37:30 +03:00
},
2016-11-15 01:47:04 +03:00
"summary": "Replaced the 'x' identifier with the 'a' identifier"
2016-11-02 21:37:30 +03:00
},
{
"span": {
2016-11-15 01:47:04 +03:00
"replace": [
{
"start": [
4,
8
],
"end": [
4,
9
]
},
{
"start": [
4,
8
],
"end": [
4,
9
]
}
]
2016-11-02 21:37:30 +03:00
},
2016-11-15 01:47:04 +03:00
"summary": "Replaced the 'y' identifier with the 'b' identifier"
2016-11-02 21:37:30 +03:00
},
2016-11-15 01:47:04 +03:00
{
"span": {
"replace": [
{
"start": [
6,
21
],
"end": [
6,
22
]
},
{
"start": [
6,
21
],
"end": [
6,
22
]
}
]
},
"summary": "Replaced '1' with '2'"
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index 3e83983..1403fc7 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,9 +1,9 @@",
" select {",
"- case x := <-c:",
"+ case a := <-c:",
" println(x)",
"- case y <- c:",
"+ case b <- c:",
" println(5)",
"- case <-time.After(1):",
"+ case <-time.After(2):",
" println(6)",
" default:",
" return"
],
"gitDir": "test/corpus/repos/go",
2016-11-22 21:51:11 +03:00
"shas": "74698df366ccb6ece8715d12898b8fd2283ad628..27c1e386799c8bf96709a273228acdd81783d86c"
2016-11-15 01:47:04 +03:00
}
,{
"testCaseDescription": "go-select-statements-delete-replacement-test",
"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-11-15 01:47:04 +03:00
1,
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-15 01:47:04 +03:00
10,
2
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-15 01:47:04 +03:00
"summary": "Deleted a select statement"
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-11-15 01:47:04 +03:00
11,
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-15 01:47:04 +03:00
20,
2
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-15 01:47:04 +03:00
"summary": "Deleted a select statement"
2016-11-02 21:37:30 +03:00
},
{
"span": {
2016-11-15 01:47:04 +03:00
"insert": {
2016-11-02 21:37:30 +03:00
"start": [
2016-11-15 01:47:04 +03:00
11,
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-15 01:47:04 +03:00
20,
2
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-15 01:47:04 +03:00
"summary": "Added a select statement"
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index 1403fc7..234dd89 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,14 +1,4 @@",
" select {",
"- case a := <-c:",
"- println(x)",
"- case b <- c:",
"- println(5)",
"- case <-time.After(2):",
"- println(6)",
"- default:",
"- return",
"-}",
"-select {",
" case x := <-c:",
" println(x)",
" case y <- c:",
"@@ -19,11 +9,11 @@ select {",
" return",
" }",
" select {",
"- case x := <-c:",
"+ case a := <-c:",
" println(x)",
"- case y <- c:",
"+ case b <- c:",
" println(5)",
"- case <-time.After(1):",
"+ case <-time.After(2):",
" println(6)",
" default:",
" return"
],
"gitDir": "test/corpus/repos/go",
2016-11-22 21:51:11 +03:00
"shas": "27c1e386799c8bf96709a273228acdd81783d86c..7d9d8276487f9607e28754f6c4dfcc77b6cda405"
2016-11-15 01:47:04 +03:00
}
,{
"testCaseDescription": "go-select-statements-delete-test",
"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-11-15 01:47:04 +03:00
1,
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-15 01:47:04 +03:00
10,
2
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-15 01:47:04 +03:00
"summary": "Deleted a select statement"
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",
"index 234dd89..d513030 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,14 +1,4 @@",
" select {",
"- case x := <-c:",
"- println(x)",
"- case y <- c:",
"- println(5)",
"- case <-time.After(1):",
"- println(6)",
"- default:",
"- return",
"-}",
"-select {",
" case a := <-c:",
" println(x)",
" case b <- c:"
2016-11-02 21:37:30 +03:00
],
"gitDir": "test/corpus/repos/go",
2016-11-22 21:51:11 +03:00
"shas": "7d9d8276487f9607e28754f6c4dfcc77b6cda405..0c9c335b0e6fd698bb0c75289427f0143e75e003"
2016-11-02 21:37:30 +03:00
}
,{
"testCaseDescription": "go-select-statements-delete-rest-test",
"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-11-15 01:47:04 +03:00
10,
2
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-15 01:47:04 +03:00
"summary": "Deleted a select statement"
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",
"index d513030..e69de29 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,10 +0,0 @@",
"-select {",
"- case a := <-c:",
"- println(x)",
"- case b <- c:",
"- println(5)",
"- case <-time.After(2):",
"- println(6)",
"- default:",
"- return",
"-}"
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-22 21:51:11 +03:00
"shas": "0c9c335b0e6fd698bb0c75289427f0143e75e003..3b1ccac09b42121a36dd141e3ba2c774fc257278"
2016-11-02 21:37:30 +03:00
}]