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
2017-01-10 16:21:35 -05:00

257 lines
7.4 KiB
JSON

[{
"testCaseDescription": "go-case-statements-setup-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
"index e69de29..7905807 100644",
"--- a/case-statements.go",
"+++ b/case-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "e63697323245115e7df39669cfc6246c45cef4bc..eadab695a0d7bc2e7c69721fdcd919d7692d75f9"
}
,{
"testCaseDescription": "go-case-statements-insert-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
11
]
}
},
"summary": "Added the 'branch' switch statement in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
"index 7905807..0b4c956 100644",
"--- a/case-statements.go",
"+++ b/case-statements.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+switch { }",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "eadab695a0d7bc2e7c69721fdcd919d7692d75f9..3a822a16e2a54121942eec79786b4f315e5cce19"
}
,{
"testCaseDescription": "go-case-statements-replacement-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
26
]
}
},
"summary": "Added the 'foo' case statement in the 'branch' switch statement of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
"index 0b4c956..27b7090 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": "3a822a16e2a54121942eec79786b4f315e5cce19..b7a647533b7e89735159274f2c61fab92488282f"
}
,{
"testCaseDescription": "go-case-statements-delete-replacement-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
26
]
}
},
"summary": "Deleted the 'foo' case statement in the 'branch' switch statement of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
"index 27b7090..0b4c956 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": "b7a647533b7e89735159274f2c61fab92488282f..f7d8c823d27b2e973994da1f5c3187e10e3fb9ee"
}
,{
"testCaseDescription": "go-case-statements-delete-insert-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
11
]
}
},
"summary": "Deleted the 'branch' switch statement in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
"index 0b4c956..7905807 100644",
"--- a/case-statements.go",
"+++ b/case-statements.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-switch { }",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f7d8c823d27b2e973994da1f5c3187e10e3fb9ee..e208281607c3ed6eb5dc7de017aa1c62590a92c5"
}
,{
"testCaseDescription": "go-case-statements-teardown-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
"index 7905807..e69de29 100644",
"--- a/case-statements.go",
"+++ b/case-statements.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "e208281607c3ed6eb5dc7de017aa1c62590a92c5..4b3bded08aaf3fa00d0370e8ba8cd8b4bf0171cc"
}]