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/slice-literals.json
2016-12-01 16:07:40 -05:00

211 lines
5.7 KiB
JSON

[{
"testCaseDescription": "go-slice-literals-setup-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index e69de29..7905807 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "59fae6750028b3a61e5928259e33b8840bd245c7..9dc8777e49e0695e949374ffa38b24719c767ac3"
}
,{
"testCaseDescription": "go-slice-literals-insert-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 7905807..3c94936 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,5 +1,10 @@",
" package main",
" ",
" func main() {",
"-",
"+const s1 = []string{}",
"+const s2 = []string{\"hi\"}",
"+const s3 = []string{",
"+\"hi\",",
"+ \"hello\",",
"+}",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "9dc8777e49e0695e949374ffa38b24719c767ac3..2b3dd17edfeec7dc65dd4e0896c3191994675585"
}
,{
"testCaseDescription": "go-slice-literals-replacement-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 3c94936..caefc00 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,10 +1,10 @@",
" package main",
" ",
" func main() {",
"-const s1 = []string{}",
"-const s2 = []string{\"hi\"}",
"+const s1 = []string{\"sup\"}",
"+const s2 = []string{\"hello\"}",
" const s3 = []string{",
"-\"hi\",",
"- \"hello\",",
"+\"bar\",",
"+ \"baz\",",
" }",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "2b3dd17edfeec7dc65dd4e0896c3191994675585..4889dbaf29410cf737f5547604bf2d1a2cb60893"
}
,{
"testCaseDescription": "go-slice-literals-delete-replacement-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index caefc00..3c94936 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,10 +1,10 @@",
" package main",
" ",
" func main() {",
"-const s1 = []string{\"sup\"}",
"-const s2 = []string{\"hello\"}",
"+const s1 = []string{}",
"+const s2 = []string{\"hi\"}",
" const s3 = []string{",
"-\"bar\",",
"- \"baz\",",
"+\"hi\",",
"+ \"hello\",",
" }",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "4889dbaf29410cf737f5547604bf2d1a2cb60893..c56dfb906ad15f05941d5938ab259beb2d975923"
}
,{
"testCaseDescription": "go-slice-literals-delete-insert-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 3c94936..7905807 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,10 +1,5 @@",
" package main",
" ",
" func main() {",
"-const s1 = []string{}",
"-const s2 = []string{\"hi\"}",
"-const s3 = []string{",
"-\"hi\",",
"- \"hello\",",
"-}",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "c56dfb906ad15f05941d5938ab259beb2d975923..1b3b62d026137fa27c19022e73cce24df6ff16ef"
}
,{
"testCaseDescription": "go-slice-literals-teardown-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 7905807..e69de29 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "1b3b62d026137fa27c19022e73cce24df6ff16ef..826a7346b1c9303bf5c62cc66c0d23147497fbc0"
}]