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/case-statements.json
Rob Rix 483e8a3f00 Regenerate all the things!
JavaScript: method call → function call.

Go: regenerated everything.
2017-01-24 15:09:28 -05:00

287 lines
8.3 KiB
JSON

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