1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/go/case-statements.json
2017-01-11 15:28:58 -08:00

257 lines
7.3 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": "d0e8fa28dbe14b07ba2bc419936874f024f1fef7..478fdd860c357da4b26d73db41c4fb84f86d80a6"
}
,{
"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 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": "478fdd860c357da4b26d73db41c4fb84f86d80a6..949cdde853e517f65a9884869e47a0ebec024aa8"
}
,{
"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 a 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": "949cdde853e517f65a9884869e47a0ebec024aa8..949ed3ec80654e3e6951e7d0ce54948031906998"
}
,{
"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 a 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": "949ed3ec80654e3e6951e7d0ce54948031906998..3bc74da6300fd402d11085883b3e03c22755a37c"
}
,{
"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 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": "3bc74da6300fd402d11085883b3e03c22755a37c..c92bacdd02c4d3844767fab6e7cd76df1506bbab"
}
,{
"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": "c92bacdd02c4d3844767fab6e7cd76df1506bbab..0243cec6939b070fc3a64358c1e332185a7d1774"
}]