mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
377 lines
12 KiB
JSON
377 lines
12 KiB
JSON
[{
|
|
"testCaseDescription": "go-grouped-var-declarations-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index e69de29..7905807 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "3dd011b8e571d843ad64cac6c52ac46bce85666b..9e96dfc82c0a31d0be19f355afbae8b1aff675f1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'zero' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'one' variable in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index 7905807..cdb45b3 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -1,5 +1,8 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+var (",
|
|
"+zero = 0",
|
|
"+one = 1",
|
|
"+)",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "9e96dfc82c0a31d0be19f355afbae8b1aff675f1..d1f40d660d87af10e5f5e45fea2d69512918079f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b variable of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index cdb45b3..806a593 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -2,7 +2,7 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" var (",
|
|
"-zero = 0",
|
|
"-one = 1",
|
|
"+a = 0",
|
|
"+b = 1",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "d1f40d660d87af10e5f5e45fea2d69512918079f..d7c2cd1954e90280b2fea57a29cf4d6f7b4f32d6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one variable of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index 806a593..cdb45b3 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -2,7 +2,7 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" var (",
|
|
"-a = 0",
|
|
"-b = 1",
|
|
"+zero = 0",
|
|
"+one = 1",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "d7c2cd1954e90280b2fea57a29cf4d6f7b4f32d6..b07d8f9002bca74db6806a69d1fc7e3c382eab21"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index cdb45b3..7905807 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -1,8 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-var (",
|
|
"-zero = 0",
|
|
"-one = 1",
|
|
"-)",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "b07d8f9002bca74db6806a69d1fc7e3c382eab21..0aa0bba7fd32cf38cec6383a7f6751a8a3df509a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "0aa0bba7fd32cf38cec6383a7f6751a8a3df509a..623045f51df8fd170e9ddd24c8c9d1b7f7b5a585"
|
|
}]
|