mirror of
https://github.com/github/semantic.git
synced 2025-01-09 00:56:32 +03:00
287 lines
8.3 KiB
JSON
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": "840ffcc3fb49c5769944cce7b4fc8f444c2b1aed..30e5ee71dd288a98026159bc4762ba813caf1e5a"
|
|
}
|
|
,{
|
|
"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": "30e5ee71dd288a98026159bc4762ba813caf1e5a..a7af99836429ee5953956b39612d30c98099952d"
|
|
}
|
|
,{
|
|
"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": "a7af99836429ee5953956b39612d30c98099952d..ce974189409e1cc2547615421f390b953e234699"
|
|
}
|
|
,{
|
|
"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": "ce974189409e1cc2547615421f390b953e234699..84d84920f7bcdff865c2a05d49e6d3d98e633866"
|
|
}
|
|
,{
|
|
"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": "84d84920f7bcdff865c2a05d49e6d3d98e633866..c455ac8dfc52ad0fcd50455429971b6e5814a066"
|
|
}
|
|
,{
|
|
"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": "c455ac8dfc52ad0fcd50455429971b6e5814a066..65bbc171b8f70b289f47abe480d261056b5ea251"
|
|
}]
|