mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +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": "62ff6615442be7bd2302df890296d069d758dc31..1b7a4052284fac92f8239738eebb77b56fb81c42"
|
|
}
|
|
,{
|
|
"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": "1b7a4052284fac92f8239738eebb77b56fb81c42..40b6fb4be66aa3d57d352d6baeebf06edbb77e51"
|
|
}
|
|
,{
|
|
"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": "40b6fb4be66aa3d57d352d6baeebf06edbb77e51..a49d6df009a087f19b18f74b49514d77f8720ee2"
|
|
}
|
|
,{
|
|
"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": "a49d6df009a087f19b18f74b49514d77f8720ee2..578dd6e4976d3dfe5ad820cfa5c945afbec65caf"
|
|
}
|
|
,{
|
|
"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": "578dd6e4976d3dfe5ad820cfa5c945afbec65caf..9f156e917c0ac7ab380ab27a8bdf1c2632724dc4"
|
|
}
|
|
,{
|
|
"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": "9f156e917c0ac7ab380ab27a8bdf1c2632724dc4..678323dd89ca74cd5fe06c4efdc8ec7abe45b581"
|
|
}]
|