mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
287 lines
8.5 KiB
JSON
287 lines
8.5 KiB
JSON
[{
|
|
"testCaseDescription": "go-label-statements-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"label-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"label-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/label-statements.go b/label-statements.go",
|
|
"index e69de29..7905807 100644",
|
|
"--- a/label-statements.go",
|
|
"+++ b/label-statements.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "78eff94a1a09fa60a957d52c31c93faa349a8c60..f6b35a8938aa363601e9d2b59dca31f6c3bc4d29"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-label-statements-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"label-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
3
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'insert_label' identifier in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"label-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/label-statements.go b/label-statements.go",
|
|
"index 7905807..b0a2969 100644",
|
|
"--- a/label-statements.go",
|
|
"+++ b/label-statements.go",
|
|
"@@ -1,5 +1,7 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+{",
|
|
"+ insert_label:",
|
|
"+}",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "f6b35a8938aa363601e9d2b59dca31f6c3bc4d29..9b9bcf70dd01bf01167ed88b4f631093ea8f7014"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-label-statements-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"label-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
3
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
3
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'insert_label' identifier with the 'replacement_label' identifier in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"label-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/label-statements.go b/label-statements.go",
|
|
"index b0a2969..3d3cf16 100644",
|
|
"--- a/label-statements.go",
|
|
"+++ b/label-statements.go",
|
|
"@@ -2,6 +2,6 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" {",
|
|
"- insert_label:",
|
|
"+ replacement_label:",
|
|
" }",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "9b9bcf70dd01bf01167ed88b4f631093ea8f7014..3b239b4436de746100a10123f381620a28430ad0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-label-statements-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"label-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
3
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
3
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'replacement_label' identifier with the 'insert_label' identifier in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"label-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/label-statements.go b/label-statements.go",
|
|
"index 3d3cf16..b0a2969 100644",
|
|
"--- a/label-statements.go",
|
|
"+++ b/label-statements.go",
|
|
"@@ -2,6 +2,6 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" {",
|
|
"- replacement_label:",
|
|
"+ insert_label:",
|
|
" }",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "3b239b4436de746100a10123f381620a28430ad0..ef5a7efc387a76c385edbfd143bc1451dfcc13c3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-label-statements-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"label-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
3
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'insert_label' identifier in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"label-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/label-statements.go b/label-statements.go",
|
|
"index b0a2969..7905807 100644",
|
|
"--- a/label-statements.go",
|
|
"+++ b/label-statements.go",
|
|
"@@ -1,7 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-{",
|
|
"- insert_label:",
|
|
"-}",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "ef5a7efc387a76c385edbfd143bc1451dfcc13c3..3bb8ac79cc90cb79f49e292b0139a7ac4558b8c8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-label-statements-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"label-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"label-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/label-statements.go b/label-statements.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/label-statements.go",
|
|
"+++ b/label-statements.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "3bb8ac79cc90cb79f49e292b0139a7ac4558b8c8..775a3d248372ee7bf7b0f4b2299b723ae1b12394"
|
|
}]
|