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": "860d356fd344d639742848cef5248f121b5dd285..5843073f8ab0e7eb2797d483574ab92a8073ec22"
|
|
}
|
|
,{
|
|
"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": "5843073f8ab0e7eb2797d483574ab92a8073ec22..9fd2af70a2734c3a18ff417e3c1fc4b5b3f26aa4"
|
|
}
|
|
,{
|
|
"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": "9fd2af70a2734c3a18ff417e3c1fc4b5b3f26aa4..fcbbc7faab8a747b9ed78123b8815e931605860c"
|
|
}
|
|
,{
|
|
"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": "fcbbc7faab8a747b9ed78123b8815e931605860c..21265d356061b8a9f0a2eb44151e8a4973ba29ad"
|
|
}
|
|
,{
|
|
"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": "21265d356061b8a9f0a2eb44151e8a4973ba29ad..61e244ffd22e5c5ed07a6f4c65e939fe495b25e0"
|
|
}
|
|
,{
|
|
"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": "61e244ffd22e5c5ed07a6f4c65e939fe495b25e0..e362710bd13f665c7d5cd9af78385ebb7784d36c"
|
|
}]
|