2017-01-12 02:18:14 +03:00
[ {
"testCaseDescription" : "go-struct-field-declarations-setup-test" ,
"expectedResult" : {
"changes" : {
"struct-field-declarations.go" : [
{
"span" : {
"insert" : {
"start" : [
1 ,
1
] ,
"end" : [
6 ,
1
]
}
} ,
"summary" : "Added the 'main' module"
}
]
} ,
"errors" : { }
} ,
"filePaths" : [
"struct-field-declarations.go"
] ,
"patch" : [
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go" ,
2017-01-17 23:26:07 +03:00
"index e69de29b..60d13f45 100644" ,
2017-01-12 02:18:14 +03:00
"--- a/struct-field-declarations.go" ,
"+++ b/struct-field-declarations.go" ,
"@@ -0,0 +1,5 @@" ,
"+package main" ,
"+" ,
"+func main() {" ,
"+ type s3 struct {} " ,
"+}"
] ,
"gitDir" : "test/corpus/repos/go" ,
2017-01-18 23:12:54 +03:00
"shas" : "5deef7045822271505960ed4cec253dedf122c38..62f0f3e2454b8e3a44f76f779c28deb62c42fd62"
2017-01-12 02:18:14 +03:00
}
, {
"testCaseDescription" : "go-struct-field-declarations-insert-test" ,
"expectedResult" : {
"changes" : {
"struct-field-declarations.go" : [
{
"span" : {
"insert" : {
"start" : [
5 ,
3
] ,
"end" : [
5 ,
8
]
}
} ,
2017-01-17 23:26:07 +03:00
"summary" : "Added the 'g int' field declaration in the struct {\n g int\n} struct type of the 'main' function"
2017-01-12 02:18:14 +03:00
}
]
} ,
"errors" : { }
} ,
"filePaths" : [
"struct-field-declarations.go"
] ,
"patch" : [
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go" ,
2017-01-17 23:26:07 +03:00
"index 60d13f45..bc84b146 100644" ,
2017-01-12 02:18:14 +03:00
"--- a/struct-field-declarations.go" ,
"+++ b/struct-field-declarations.go" ,
"@@ -1,5 +1,7 @@" ,
" package main" ,
" " ,
" func main() {" ,
"- type s3 struct {} " ,
"+ type s3 struct {" ,
"+ g int" ,
"+} " ,
" }"
] ,
"gitDir" : "test/corpus/repos/go" ,
2017-01-18 23:12:54 +03:00
"shas" : "62f0f3e2454b8e3a44f76f779c28deb62c42fd62..03c576b5debd2c48337432cb2de75b1188457088"
2017-01-12 02:18:14 +03:00
}
, {
"testCaseDescription" : "go-struct-field-declarations-replacement-test" ,
"expectedResult" : {
"changes" : {
"struct-field-declarations.go" : [
{
"span" : {
"replace" : [
{
"start" : [
5 ,
3
] ,
"end" : [
5 ,
2017-01-18 21:01:25 +03:00
8
2017-01-12 02:18:14 +03:00
]
} ,
{
"start" : [
5 ,
3
] ,
"end" : [
5 ,
2017-01-18 21:01:25 +03:00
11
2017-01-12 02:18:14 +03:00
]
}
]
} ,
2017-01-18 21:01:25 +03:00
"summary" : "Replaced the 'g int' field declaration with the 'h, i int' field declaration in the struct {\n h, i int\n} struct type of the 'main' function"
2017-01-12 02:18:14 +03:00
}
]
} ,
"errors" : { }
} ,
"filePaths" : [
"struct-field-declarations.go"
] ,
"patch" : [
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go" ,
2017-01-17 23:26:07 +03:00
"index bc84b146..f3ca9a51 100644" ,
2017-01-12 02:18:14 +03:00
"--- a/struct-field-declarations.go" ,
"+++ b/struct-field-declarations.go" ,
"@@ -2,6 +2,6 @@ package main" ,
" " ,
" func main() {" ,
" type s3 struct {" ,
"- g int" ,
"+ h, i int" ,
" } " ,
" }"
] ,
"gitDir" : "test/corpus/repos/go" ,
2017-01-18 23:12:54 +03:00
"shas" : "03c576b5debd2c48337432cb2de75b1188457088..b565b45f613603ee651612ec4f5015000d30e207"
2017-01-12 02:18:14 +03:00
}
, {
"testCaseDescription" : "go-struct-field-declarations-delete-replacement-test" ,
"expectedResult" : {
"changes" : {
"struct-field-declarations.go" : [
{
"span" : {
"replace" : [
{
"start" : [
5 ,
3
] ,
"end" : [
5 ,
2017-01-18 21:01:25 +03:00
11
2017-01-12 02:18:14 +03:00
]
} ,
{
"start" : [
5 ,
3
] ,
"end" : [
5 ,
2017-01-18 21:01:25 +03:00
8
2017-01-12 02:18:14 +03:00
]
}
]
} ,
2017-01-18 21:01:25 +03:00
"summary" : "Replaced the 'h, i int' field declaration with the 'g int' field declaration in the struct {\n g int\n} struct type of the 'main' function"
2017-01-12 02:18:14 +03:00
}
]
} ,
"errors" : { }
} ,
"filePaths" : [
"struct-field-declarations.go"
] ,
"patch" : [
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go" ,
2017-01-17 23:26:07 +03:00
"index f3ca9a51..bc84b146 100644" ,
2017-01-12 02:18:14 +03:00
"--- a/struct-field-declarations.go" ,
"+++ b/struct-field-declarations.go" ,
"@@ -2,6 +2,6 @@ package main" ,
" " ,
" func main() {" ,
" type s3 struct {" ,
"- h, i int" ,
"+ g int" ,
" } " ,
" }"
] ,
"gitDir" : "test/corpus/repos/go" ,
2017-01-18 23:12:54 +03:00
"shas" : "b565b45f613603ee651612ec4f5015000d30e207..2276d09f9b7b1fa0729ea0fddcdfebff360c8f5d"
2017-01-12 02:18:14 +03:00
}
, {
"testCaseDescription" : "go-struct-field-declarations-delete-insert-test" ,
"expectedResult" : {
"changes" : {
"struct-field-declarations.go" : [
{
"span" : {
"delete" : {
"start" : [
5 ,
3
] ,
"end" : [
5 ,
8
]
}
} ,
2017-01-17 23:26:07 +03:00
"summary" : "Deleted the 'g int' field declaration in the struct {} struct type of the 'main' function"
2017-01-12 02:18:14 +03:00
}
]
} ,
"errors" : { }
} ,
"filePaths" : [
"struct-field-declarations.go"
] ,
"patch" : [
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go" ,
2017-01-17 23:26:07 +03:00
"index bc84b146..60d13f45 100644" ,
2017-01-12 02:18:14 +03:00
"--- a/struct-field-declarations.go" ,
"+++ b/struct-field-declarations.go" ,
"@@ -1,7 +1,5 @@" ,
" package main" ,
" " ,
" func main() {" ,
"- type s3 struct {" ,
"- g int" ,
"-} " ,
"+ type s3 struct {} " ,
" }"
] ,
"gitDir" : "test/corpus/repos/go" ,
2017-01-18 23:12:54 +03:00
"shas" : "2276d09f9b7b1fa0729ea0fddcdfebff360c8f5d..0e91f39b4267ac56153c02a6ce70ca1bd9e98919"
2017-01-12 02:18:14 +03:00
}
, {
"testCaseDescription" : "go-struct-field-declarations-teardown-test" ,
"expectedResult" : {
"changes" : {
"struct-field-declarations.go" : [
{
"span" : {
"delete" : {
"start" : [
1 ,
1
] ,
"end" : [
6 ,
1
]
}
} ,
"summary" : "Deleted the 'main' module"
}
]
} ,
"errors" : { }
} ,
"filePaths" : [
"struct-field-declarations.go"
] ,
"patch" : [
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go" ,
2017-01-17 23:26:07 +03:00
"index 60d13f45..e69de29b 100644" ,
2017-01-12 02:18:14 +03:00
"--- a/struct-field-declarations.go" ,
"+++ b/struct-field-declarations.go" ,
"@@ -1,5 +0,0 @@" ,
"-package main" ,
"-" ,
"-func main() {" ,
"- type s3 struct {} " ,
"-}"
] ,
"gitDir" : "test/corpus/repos/go" ,
2017-01-18 23:12:54 +03:00
"shas" : "0e91f39b4267ac56153c02a6ce70ca1bd9e98919..2ff7aeec9c5efbeaf3a7b681f718640926ca1f90"
2017-01-12 02:18:14 +03:00
} ]