mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +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": "b92b7fa71587a369b3db2ed6695f7537c36a4729..b7aa559dab86c329ab14bbb2eafe55e9441616c9"
|
|
}
|
|
,{
|
|
"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": "b7aa559dab86c329ab14bbb2eafe55e9441616c9..d9ade99deb5308b89c0e181dde0456d599f990c6"
|
|
}
|
|
,{
|
|
"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": "d9ade99deb5308b89c0e181dde0456d599f990c6..f9cb6224ec86263e0a869784a0318adbcaedfded"
|
|
}
|
|
,{
|
|
"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": "f9cb6224ec86263e0a869784a0318adbcaedfded..1c1fd89d40ff03a1eb8812937a6e77a17594e44b"
|
|
}
|
|
,{
|
|
"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": "1c1fd89d40ff03a1eb8812937a6e77a17594e44b..e63f149e0a9fea7a3995c7230537150196232bc0"
|
|
}
|
|
,{
|
|
"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": "e63f149e0a9fea7a3995c7230537150196232bc0..1c84cb51e325b0263f1b4b1aab41ebbacf00be1c"
|
|
}]
|