1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00
semantic/test/corpus/diff-summaries/go/switch-statements.json

658 lines
22 KiB
JSON
Raw Normal View History

2016-11-02 05:05:43 +03:00
[{
"testCaseDescription": "go-switch-statements-insert-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
1
2016-11-02 05:05:43 +03:00
],
"end": [
4,
2016-11-11 00:19:53 +03:00
2
2016-11-02 05:05:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the 'branch' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statements.go"
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index e69de29..e444d1e 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -0,0 +1,4 @@",
"+switch { case x < y: f1()",
"+case x < z: g()",
"+case x == 4: h()",
"+}"
],
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "c36e8a2c2f29eaffb7e46afa33aec36b90671fb3..f68e8c719073361172125edeb8e0b76f0e0e8a80"
2016-11-11 00:19:53 +03:00
}
,{
"testCaseDescription": "go-switch-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
2016-11-02 05:05:43 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
1
2016-11-02 05:05:43 +03:00
],
"end": [
4,
2016-11-11 00:19:53 +03:00
2
2016-11-02 05:05:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"insert": {
"start": [
5,
2016-11-11 00:19:53 +03:00
1
2016-11-02 05:05:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
8,
2
2016-11-02 05:05:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"switch-statements.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index e444d1e..e2e5cf3 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,3 +1,11 @@",
"+switch { case a < b: f1()",
"+case c < d: g()",
"+case e == 4: f()",
"+}",
"+switch { case x < y: f1()",
"+case x < z: g()",
"+case x == 4: h()",
"+}",
" switch { case x < y: f1()",
" case x < z: g()",
" case x == 4: h()"
2016-11-02 05:05:43 +03:00
],
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "f68e8c719073361172125edeb8e0b76f0e0e8a80..c1f6315016c957559d3456ece2258e334fe3038f"
2016-11-02 05:05:43 +03:00
}
,{
"testCaseDescription": "go-switch-statements-delete-insert-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
15
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
16
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
15
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
16
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'a' identifier with the 'x' identifier in the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
19
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
20
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
19
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
20
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'b' identifier with the 'y' identifier in the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
6
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
7
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
6
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
7
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'c' identifier with the 'x' identifier in the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
10
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
11
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
10
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
11
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'd' identifier with the 'z' identifier in the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
6
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
7
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
6
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
7
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'e' identifier with the 'x' identifier in the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
14
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
15
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
14
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
15
]
}
]
},
"summary": "Replaced the 'f' identifier with the 'h' identifier in the h() function call"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statements.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index e2e5cf3..143707d 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,6 +1,6 @@",
"-switch { case a < b: f1()",
"-case c < d: g()",
"-case e == 4: f()",
"+switch { case x < y: f1()",
"+case x < z: g()",
"+case x == 4: h()",
" }",
" switch { case x < y: f1()",
" case x < z: g()"
],
2016-11-02 05:05:43 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "c1f6315016c957559d3456ece2258e334fe3038f..8e26eff55878736cca530b81a2d47ba5e977f0a7"
2016-11-02 05:05:43 +03:00
}
,{
"testCaseDescription": "go-switch-statements-replacement-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
15
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
16
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
15
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
16
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'x' identifier with the 'a' identifier in the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
19
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
20
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
19
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 05:05:43 +03:00
20
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'y' identifier with the 'b' identifier in the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
6
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
7
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
6
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
7
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'x' identifier with the 'c' identifier in the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
10
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
11
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
10
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 05:05:43 +03:00
11
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'z' identifier with the 'd' identifier in the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
6
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
7
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
6
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
7
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'x' identifier with the 'e' identifier in the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
14
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
15
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
14
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 05:05:43 +03:00
15
]
}
]
},
"summary": "Replaced the 'h' identifier with the 'f' identifier in the f() function call"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statements.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index 143707d..e2e5cf3 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,6 +1,6 @@",
"-switch { case x < y: f1()",
"-case x < z: g()",
"-case x == 4: h()",
"+switch { case a < b: f1()",
"+case c < d: g()",
"+case e == 4: f()",
" }",
" switch { case x < y: f1()",
" case x < z: g()"
],
2016-11-02 05:05:43 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "8e26eff55878736cca530b81a2d47ba5e977f0a7..2e399501ce46ddde3cd1da2e78fd074a94d8beca"
2016-11-02 05:05:43 +03:00
}
,{
"testCaseDescription": "go-switch-statements-delete-replacement-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
1
2016-11-02 05:05:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2
2016-11-02 05:05:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
5,
1
2016-11-02 05:05:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
8,
2
2016-11-02 05:05:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
},
{
"span": {
2016-11-11 00:19:53 +03:00
"insert": {
2016-11-02 05:05:43 +03:00
"start": [
2016-11-11 00:19:53 +03:00
5,
1
2016-11-02 05:05:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
8,
2
2016-11-02 05:05:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the 'branch' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statements.go"
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index e2e5cf3..6989d28 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,12 +1,8 @@",
"-switch { case a < b: f1()",
"-case c < d: g()",
"-case e == 4: f()",
"-}",
" switch { case x < y: f1()",
" case x < z: g()",
" case x == 4: h()",
" }",
"-switch { case x < y: f1()",
"-case x < z: g()",
"-case x == 4: h()",
"+switch { case a < b: f1()",
"+case c < d: g()",
"+case e == 4: f()",
" }"
],
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "2e399501ce46ddde3cd1da2e78fd074a94d8beca..4921d8fdb916bc218de911a98f998902c1cf3d23"
2016-11-11 00:19:53 +03:00
}
,{
"testCaseDescription": "go-switch-statements-delete-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
2016-11-02 05:05:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
1
2016-11-02 05:05:43 +03:00
],
"end": [
4,
2016-11-11 00:19:53 +03:00
2
2016-11-02 05:05:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the 'branch' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statements.go"
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index 6989d28..eff174f 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,7 +1,3 @@",
"-switch { case x < y: f1()",
"-case x < z: g()",
"-case x == 4: h()",
"-}",
" switch { case a < b: f1()",
" case c < d: g()",
" case e == 4: f()"
],
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "4921d8fdb916bc218de911a98f998902c1cf3d23..70000fb86a8c4754ceeeb76ac97f5242d5bc4687"
2016-11-11 00:19:53 +03:00
}
,{
"testCaseDescription": "go-switch-statements-delete-rest-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
2016-11-02 05:05:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
1
2016-11-02 05:05:43 +03:00
],
"end": [
4,
2016-11-11 00:19:53 +03:00
2
2016-11-02 05:05:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the 'branch' switch statement"
2016-11-02 05:05:43 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"switch-statements.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index eff174f..e69de29 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,4 +0,0 @@",
"-switch { case a < b: f1()",
"-case c < d: g()",
"-case e == 4: f()",
"-}"
2016-11-02 05:05:43 +03:00
],
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "70000fb86a8c4754ceeeb76ac97f5242d5bc4687..b2e0de82447eb26fa111b23d6ecda9ba24b8f37f"
2016-11-02 05:05:43 +03:00
}]