mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
557 lines
19 KiB
JSON
557 lines
19 KiB
JSON
[{
|
|
"testCaseDescription": "go-variadic-function-declarations-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index e69de29..7905807 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "8e2c3b2f7572ae30271a082bae18a778f0c69f26..82b854d7ad4a64e97d188f186b4ca7830855b2cd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
20
|
|
],
|
|
"end": [
|
|
4,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{}' block in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f2' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'int' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
17
|
|
],
|
|
"end": [
|
|
5,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{}' block in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f3' function in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'func f1(a ...*int)' at line 4, column 1 - line 4, column 19 in the main function of the 'main' module"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index 7905807..7447883 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,5 +1,7 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+func f1(a ...*int) {}",
|
|
"+func f2(...int) {}",
|
|
"+func f3(a, ...bool) {}",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "82b854d7ad4a64e97d188f186b4ca7830855b2cd..43a531aaad5f5072cae4872a172fd04a25687d20"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'f1' identifier with the 'g1' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'f2' identifier with the 'g2' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
6
|
|
],
|
|
"end": [
|
|
6,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
6
|
|
],
|
|
"end": [
|
|
6,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'f3' identifier with the 'g3' identifier in the g3 function of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index 7447883..42ee738 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,7 +1,7 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-func f1(a ...*int) {}",
|
|
"-func f2(...int) {}",
|
|
"-func f3(a, ...bool) {}",
|
|
"+func g1(a ...*int) {}",
|
|
"+func g2(...int) {}",
|
|
"+func g3(a, ...bool) {}",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "43a531aaad5f5072cae4872a172fd04a25687d20..b40498a76f0116e196ec086c9558b5c6beb091ac"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'g1' identifier with the 'f1' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'g2' identifier with the 'f2' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
6
|
|
],
|
|
"end": [
|
|
6,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
6
|
|
],
|
|
"end": [
|
|
6,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'g3' identifier with the 'f3' identifier in the f3 function of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index 42ee738..7447883 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,7 +1,7 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-func g1(a ...*int) {}",
|
|
"-func g2(...int) {}",
|
|
"-func g3(a, ...bool) {}",
|
|
"+func f1(a ...*int) {}",
|
|
"+func f2(...int) {}",
|
|
"+func f3(a, ...bool) {}",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "b40498a76f0116e196ec086c9558b5c6beb091ac..28283dd9ac27d835c864d0205101265574f633cf"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
20
|
|
],
|
|
"end": [
|
|
4,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{}' block in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f2' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'int' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
17
|
|
],
|
|
"end": [
|
|
5,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{}' block in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f3' function in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'func f1(a ...*int)' at line 4, column 1 - line 4, column 19 in the main function of the 'main' module"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index 7447883..7905807 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,7 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-func f1(a ...*int) {}",
|
|
"-func f2(...int) {}",
|
|
"-func f3(a, ...bool) {}",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "28283dd9ac27d835c864d0205101265574f633cf..98740c1a776a74b6805d246f8d41683d4b2ee50a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "98740c1a776a74b6805d246f8d41683d4b2ee50a..e926310723164cc7bf5f7e8870cb8cd3837359f1"
|
|
}]
|