2017-01-11 00:21:35 +03:00
|
|
|
[{
|
|
|
|
"testCaseDescription": "go-case-statements-setup-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"case-statements.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2017-01-24 23:09:28 +03:00
|
|
|
1,
|
|
|
|
13
|
2017-01-11 00:21:35 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'main' module"
|
2017-01-24 23:09:28 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
3,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
2
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'main' function"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"case-statements.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/case-statements.go b/case-statements.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index e69de29b..79058077 100644",
|
2017-01-11 00:21:35 +03:00
|
|
|
"--- a/case-statements.go",
|
|
|
|
"+++ b/case-statements.go",
|
|
|
|
"@@ -0,0 +1,5 @@",
|
|
|
|
"+package main",
|
|
|
|
"+",
|
|
|
|
"+func main() {",
|
|
|
|
"+",
|
|
|
|
"+}"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "dc930ebf88adb233dfc5f8871f984a11cffe3806..2bc4380dcecc0848f1af1861ecee3929841a1b99"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-case-statements-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"case-statements.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
4,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
11
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Added a switch statement in the main function"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"case-statements.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/case-statements.go b/case-statements.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 79058077..0b4c9561 100644",
|
2017-01-11 00:21:35 +03:00
|
|
|
"--- a/case-statements.go",
|
|
|
|
"+++ b/case-statements.go",
|
|
|
|
"@@ -1,5 +1,5 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"-",
|
|
|
|
"+switch { }",
|
|
|
|
" }"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "2bc4380dcecc0848f1af1861ecee3929841a1b99..19f8304d9658730898832a2918913de7e1a88eae"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-case-statements-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"case-statements.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
4,
|
2017-01-24 23:09:28 +03:00
|
|
|
10
|
2017-01-11 00:21:35 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
2017-01-24 23:09:28 +03:00
|
|
|
24
|
2017-01-11 00:21:35 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Added the 'case foo' case statement in a switch statement of the 'main' function"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"case-statements.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/case-statements.go b/case-statements.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 0b4c9561..27b70908 100644",
|
2017-01-11 00:21:35 +03:00
|
|
|
"--- a/case-statements.go",
|
|
|
|
"+++ b/case-statements.go",
|
|
|
|
"@@ -1,5 +1,5 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"-switch { }",
|
|
|
|
"+switch { case foo: f1() }",
|
|
|
|
" }"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "19f8304d9658730898832a2918913de7e1a88eae..7851ac19f501c67b19645409e0f92b69e1d321d7"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-case-statements-delete-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"case-statements.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
4,
|
2017-01-24 23:09:28 +03:00
|
|
|
10
|
2017-01-11 00:21:35 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
2017-01-24 23:09:28 +03:00
|
|
|
24
|
2017-01-11 00:21:35 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Deleted the 'case foo' case statement in a switch statement of the 'main' function"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"case-statements.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/case-statements.go b/case-statements.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 27b70908..0b4c9561 100644",
|
2017-01-11 00:21:35 +03:00
|
|
|
"--- a/case-statements.go",
|
|
|
|
"+++ b/case-statements.go",
|
|
|
|
"@@ -1,5 +1,5 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"-switch { case foo: f1() }",
|
|
|
|
"+switch { }",
|
|
|
|
" }"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "7851ac19f501c67b19645409e0f92b69e1d321d7..a53ce58224c2e4be35c1ed9d4b3239307d3d91b9"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-case-statements-delete-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"case-statements.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
4,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
4,
|
|
|
|
11
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-01-24 23:09:28 +03:00
|
|
|
"summary": "Deleted a switch statement in the main function"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"case-statements.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/case-statements.go b/case-statements.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 0b4c9561..79058077 100644",
|
2017-01-11 00:21:35 +03:00
|
|
|
"--- a/case-statements.go",
|
|
|
|
"+++ b/case-statements.go",
|
|
|
|
"@@ -1,5 +1,5 @@",
|
|
|
|
" package main",
|
|
|
|
" ",
|
|
|
|
" func main() {",
|
|
|
|
"-switch { }",
|
|
|
|
"+",
|
|
|
|
" }"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "a53ce58224c2e4be35c1ed9d4b3239307d3d91b9..928a5080cc8dd887c2fb11481854001257cabf62"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-case-statements-teardown-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"case-statements.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2017-01-24 23:09:28 +03:00
|
|
|
1,
|
|
|
|
13
|
2017-01-11 00:21:35 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'main' module"
|
2017-01-24 23:09:28 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
3,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
5,
|
|
|
|
2
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'main' function"
|
2017-01-11 00:21:35 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"case-statements.go"
|
|
|
|
],
|
|
|
|
"patch": [
|
|
|
|
"diff --git a/case-statements.go b/case-statements.go",
|
2017-01-17 23:26:07 +03:00
|
|
|
"index 79058077..e69de29b 100644",
|
2017-01-11 00:21:35 +03:00
|
|
|
"--- a/case-statements.go",
|
|
|
|
"+++ b/case-statements.go",
|
|
|
|
"@@ -1,5 +0,0 @@",
|
|
|
|
"-package main",
|
|
|
|
"-",
|
|
|
|
"-func main() {",
|
|
|
|
"-",
|
|
|
|
"-}"
|
|
|
|
],
|
|
|
|
"gitDir": "test/corpus/repos/go",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "928a5080cc8dd887c2fb11481854001257cabf62..6062f017a0391db40a8334e9e8b1f6d5680a0aa4"
|
2017-01-11 00:21:35 +03:00
|
|
|
}]
|