mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
407 lines
14 KiB
JSON
407 lines
14 KiB
JSON
[{
|
|
"testCaseDescription": "go-grouped-import-declarations-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index e69de29..7905807 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "2be724661b34d7fbc740a5b2d599c03ed0feef47..7a27ed2d0a56f332003a0d30d5a937457b588de4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 4, column 1 - line 8, column 2 in the main function of the 'main' module"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index 7905807..b544dde 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,5 +1,9 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+import (",
|
|
"+\"net/http\"",
|
|
"+ . \"some/dsl\"",
|
|
"+ alias \"some/package\"",
|
|
"+)",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "7a27ed2d0a56f332003a0d30d5a937457b588de4..a813dca879346673d61e144227e93349fea91108"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
11
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"net/http\" string with the \"net/socket\" string in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
16
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
9
|
|
],
|
|
"end": [
|
|
7,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
9
|
|
],
|
|
"end": [
|
|
7,
|
|
26
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"some/package\" string with the \"awesome/package\" string in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index b544dde..1fd89e1 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -2,8 +2,8 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" import (",
|
|
"-\"net/http\"",
|
|
"- . \"some/dsl\"",
|
|
"- alias \"some/package\"",
|
|
"+\"net/socket\"",
|
|
"+ . \"types/dsl\"",
|
|
"+ alias \"awesome/package\"",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a813dca879346673d61e144227e93349fea91108..ba09c2a47ebb8573e017bc355576ca899defec60"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
11
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"net/socket\" string with the \"net/http\" string in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
9
|
|
],
|
|
"end": [
|
|
7,
|
|
26
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
9
|
|
],
|
|
"end": [
|
|
7,
|
|
23
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"awesome/package\" string with the \"some/package\" string in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index 1fd89e1..b544dde 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -2,8 +2,8 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" import (",
|
|
"-\"net/socket\"",
|
|
"- . \"types/dsl\"",
|
|
"- alias \"awesome/package\"",
|
|
"+\"net/http\"",
|
|
"+ . \"some/dsl\"",
|
|
"+ alias \"some/package\"",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "ba09c2a47ebb8573e017bc355576ca899defec60..a2916860c251980382dff40dc901e4f4dddb49a9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 4, column 1 - line 8, column 2 in the main function of the 'main' module"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index b544dde..7905807 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,9 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-import (",
|
|
"-\"net/http\"",
|
|
"- . \"some/dsl\"",
|
|
"- alias \"some/package\"",
|
|
"-)",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a2916860c251980382dff40dc901e4f4dddb49a9..6a00b8c3d3b1ea3562446a8c5e01e802d41f0714"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "6a00b8c3d3b1ea3562446a8c5e01e802d41f0714..5ba2f3848075790efeeabe7f701b95ad6ee38727"
|
|
}]
|