mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
209 lines
5.8 KiB
JSON
209 lines
5.8 KiB
JSON
[{
|
|
"testCaseDescription": "go-struct-literals-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"struct-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/struct-literals.go b/struct-literals.go",
|
|
"index e69de29..7905807 100644",
|
|
"--- a/struct-literals.go",
|
|
"+++ b/struct-literals.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "038660e411b5d76ea18326baceafe7ec4b831608..316837589b22da579a739e892b35f99571c266c6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/struct-literals.go b/struct-literals.go",
|
|
"index 7905807..e6fd4f1 100644",
|
|
"--- a/struct-literals.go",
|
|
"+++ b/struct-literals.go",
|
|
"@@ -1,5 +1,10 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+const s1 = Person{",
|
|
"+name: \"Frank\",",
|
|
"+Age: \"5 months\",",
|
|
"+}",
|
|
"+const s2 = struct{i int;}{i: 5}",
|
|
"+const s3 = time.Time{}",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "316837589b22da579a739e892b35f99571c266c6..a734edbee890da92a50f0aca1b0c7c87027283ec"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/struct-literals.go b/struct-literals.go",
|
|
"index e6fd4f1..06724a4 100644",
|
|
"--- a/struct-literals.go",
|
|
"+++ b/struct-literals.go",
|
|
"@@ -1,10 +1,10 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-const s1 = Person{",
|
|
"+const s1 = Dog{",
|
|
" name: \"Frank\",",
|
|
" Age: \"5 months\",",
|
|
" }",
|
|
"-const s2 = struct{i int;}{i: 5}",
|
|
"-const s3 = time.Time{}",
|
|
"+const s2 = struct{i float;}{j: 6}",
|
|
"+const s3 = time.Month{}",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a734edbee890da92a50f0aca1b0c7c87027283ec..3c7a9d4bc2b1303e1ddae8881644461017345b4d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/struct-literals.go b/struct-literals.go",
|
|
"index 06724a4..e6fd4f1 100644",
|
|
"--- a/struct-literals.go",
|
|
"+++ b/struct-literals.go",
|
|
"@@ -1,10 +1,10 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-const s1 = Dog{",
|
|
"+const s1 = Person{",
|
|
" name: \"Frank\",",
|
|
" Age: \"5 months\",",
|
|
" }",
|
|
"-const s2 = struct{i float;}{j: 6}",
|
|
"-const s3 = time.Month{}",
|
|
"+const s2 = struct{i int;}{i: 5}",
|
|
"+const s3 = time.Time{}",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "3c7a9d4bc2b1303e1ddae8881644461017345b4d..e9b3ddbe62a7251304b3c10705e041704b8fc3cd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/struct-literals.go b/struct-literals.go",
|
|
"index e6fd4f1..7905807 100644",
|
|
"--- a/struct-literals.go",
|
|
"+++ b/struct-literals.go",
|
|
"@@ -1,10 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-const s1 = Person{",
|
|
"-name: \"Frank\",",
|
|
"-Age: \"5 months\",",
|
|
"-}",
|
|
"-const s2 = struct{i int;}{i: 5}",
|
|
"-const s3 = time.Time{}",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "e9b3ddbe62a7251304b3c10705e041704b8fc3cd..2d31d8c2cee98d9cd150c3143e60260b0a36a4ed"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"struct-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/struct-literals.go b/struct-literals.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/struct-literals.go",
|
|
"+++ b/struct-literals.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "2d31d8c2cee98d9cd150c3143e60260b0a36a4ed..e894af8329d5891cd7c8c08c181b5e0120dacff4"
|
|
}]
|