mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
193 lines
5.4 KiB
JSON
193 lines
5.4 KiB
JSON
[{
|
|
"testCaseDescription": "go-function-literals-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-literals.go b/function-literals.go",
|
|
"index e69de29..7905807 100644",
|
|
"--- a/function-literals.go",
|
|
"+++ b/function-literals.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "34988d46279dcf664704cacff021f3169bfec11a..05bc03407ec1c8ee0fe1986fa841bde51109df44"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-function-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-literals.go b/function-literals.go",
|
|
"index 7905807..1f4ead9 100644",
|
|
"--- a/function-literals.go",
|
|
"+++ b/function-literals.go",
|
|
"@@ -1,5 +1,7 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+const s1 = func(s string) (int, int) {",
|
|
"+return 1, 2",
|
|
"+}",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "05bc03407ec1c8ee0fe1986fa841bde51109df44..0cf29044b641b9d81d03501d94f00a027846cd59"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-function-literals-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-literals.go b/function-literals.go",
|
|
"index 1f4ead9..7b03466 100644",
|
|
"--- a/function-literals.go",
|
|
"+++ b/function-literals.go",
|
|
"@@ -1,7 +1,7 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-const s1 = func(s string) (int, int) {",
|
|
"+const s1 = func(b int) (string, string) {",
|
|
" return 1, 2",
|
|
" }",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "0cf29044b641b9d81d03501d94f00a027846cd59..a47974a422af79f549b587def64422db05dd846a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-function-literals-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-literals.go b/function-literals.go",
|
|
"index 7b03466..1f4ead9 100644",
|
|
"--- a/function-literals.go",
|
|
"+++ b/function-literals.go",
|
|
"@@ -1,7 +1,7 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-const s1 = func(b int) (string, string) {",
|
|
"+const s1 = func(s string) (int, int) {",
|
|
" return 1, 2",
|
|
" }",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a47974a422af79f549b587def64422db05dd846a..a0b369652f6ab5928c261069b42b354e92d387ee"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-function-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-literals.go b/function-literals.go",
|
|
"index 1f4ead9..7905807 100644",
|
|
"--- a/function-literals.go",
|
|
"+++ b/function-literals.go",
|
|
"@@ -1,7 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-const s1 = func(s string) (int, int) {",
|
|
"-return 1, 2",
|
|
"-}",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a0b369652f6ab5928c261069b42b354e92d387ee..405e17c52ed27a29eaa2f74faa172ad1e8f58f9f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-function-literals-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-literals.go b/function-literals.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/function-literals.go",
|
|
"+++ b/function-literals.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "405e17c52ed27a29eaa2f74faa172ad1e8f58f9f..0056f4e97a3f96f120dc1ec4eedec0833a033521"
|
|
}]
|