mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
257 lines
7.3 KiB
JSON
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 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": "db27214e630605cde51e401d0422388639b33b90..aac064a4129c125cc528674ab80ffa7298a1fbff"
|
|
}
|
|
,{
|
|
"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 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": "aac064a4129c125cc528674ab80ffa7298a1fbff..1047324baf5a3332bbe6b786fefd277a9ce869fa"
|
|
}
|
|
,{
|
|
"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 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": "1047324baf5a3332bbe6b786fefd277a9ce869fa..1187cd0a0b0490863aeb45c11ea00bb88461381d"
|
|
}
|
|
,{
|
|
"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 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": "1187cd0a0b0490863aeb45c11ea00bb88461381d..6c6b743946f907c9e17f47ea6d56f7535963ffe9"
|
|
}
|
|
,{
|
|
"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 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": "6c6b743946f907c9e17f47ea6d56f7535963ffe9..baaa3ca57d862e144fceb6a788429c7a826d11a6"
|
|
}
|
|
,{
|
|
"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 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": "baaa3ca57d862e144fceb6a788429c7a826d11a6..327e2f73e92556b721e5267ed4e74b2cb7a9cfc1"
|
|
}]
|