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

197 lines
5.3 KiB
JSON

[{
"testCaseDescription": "go-string-literals-setup-test",
"expectedResult": {
"changes": {
"string-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"string-literals.go"
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index e69de29..7905807 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "af43175aa1ae51c7f1760a8d2e73eb14fb55b258..93541693f72981f651d191746c237b1ce257d084"
}
,{
"testCaseDescription": "go-string-literals-insert-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"string-literals.go"
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index 7905807..9a69966 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -1,5 +1,8 @@",
" package main",
" ",
" func main() {",
"-",
"+const (",
"+a = \"0\"",
"+b = \"hello world\"",
"+)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "93541693f72981f651d191746c237b1ce257d084..2d7f4314c9ba6f28e4988fd55f8408bfb76f872f"
}
,{
"testCaseDescription": "go-string-literals-replacement-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"string-literals.go"
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index 9a69966..fbbdb93 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" const (",
"-a = \"0\"",
"-b = \"hello world\"",
"+a = \"2\"",
"+b = \"hi\"",
" )",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "2d7f4314c9ba6f28e4988fd55f8408bfb76f872f..8db5fa4e300063021265342271797b5c1226bcb9"
}
,{
"testCaseDescription": "go-string-literals-delete-replacement-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"string-literals.go"
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index fbbdb93..9a69966 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" const (",
"-a = \"2\"",
"-b = \"hi\"",
"+a = \"0\"",
"+b = \"hello world\"",
" )",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "8db5fa4e300063021265342271797b5c1226bcb9..d5f2b9939de51400fbdfd1c072a1f0b477e41019"
}
,{
"testCaseDescription": "go-string-literals-delete-insert-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"string-literals.go"
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index 9a69966..7905807 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -1,8 +1,5 @@",
" package main",
" ",
" func main() {",
"-const (",
"-a = \"0\"",
"-b = \"hello world\"",
"-)",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "d5f2b9939de51400fbdfd1c072a1f0b477e41019..43e625b401c24b5c38fe0f277ed07e8a53aa3131"
}
,{
"testCaseDescription": "go-string-literals-teardown-test",
"expectedResult": {
"changes": {
"string-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"string-literals.go"
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index 7905807..e69de29 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "43e625b401c24b5c38fe0f277ed07e8a53aa3131..59fae6750028b3a61e5928259e33b8840bd245c7"
}]