mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +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": "9a02b82ed791d6093b557bde927da0db6586a141..9a3f0bd2527843c19792586940c58d9ac7cf1bb1"
|
|
}
|
|
,{
|
|
"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": "9a3f0bd2527843c19792586940c58d9ac7cf1bb1..717fee5a815beb76286193913b4bbdb2cbd4997e"
|
|
}
|
|
,{
|
|
"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": "717fee5a815beb76286193913b4bbdb2cbd4997e..d8d436d648e0ccad14a54b275301bd7edbed68e1"
|
|
}
|
|
,{
|
|
"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": "d8d436d648e0ccad14a54b275301bd7edbed68e1..41ea7fd4f753108bf67b181d950fc73642316e01"
|
|
}
|
|
,{
|
|
"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": "41ea7fd4f753108bf67b181d950fc73642316e01..23ecf547fbb656484104d02b8a712af28b98f248"
|
|
}
|
|
,{
|
|
"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": "23ecf547fbb656484104d02b8a712af28b98f248..23874e933b13d7ac439111764b1ed1443d0a63b0"
|
|
}]
|