mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
455 lines
15 KiB
JSON
455 lines
15 KiB
JSON
[{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index e69de29b..79058077 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "7f27514fe8e2704be349add10b98e8fe9a70eb2b..68f2c072f86cb2e6282682cf9586b66db9ff95fa"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
5
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'zero' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'one' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
10
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'two' variable in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index 79058077..fcdc3127 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,5 +1,6 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+var zero int",
|
|
"+var one, two uint64",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "68f2c072f86cb2e6282682cf9586b66db9ff95fa..50525aa58d870bb29ebf2748b0790e3d3389f6bc"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
5
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
5
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'one' identifier with the 'b' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
10
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
8
|
|
],
|
|
"end": [
|
|
5,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'two' identifier with the 'c' identifier in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index fcdc3127..8aab74f1 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-var zero int",
|
|
"-var one, two uint64",
|
|
"+var a int",
|
|
"+var b, c uint64",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "50525aa58d870bb29ebf2748b0790e3d3389f6bc..92f1dde57fd8b6dc1832eae0799399b8a5959358"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
5
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
5
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'one' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
8
|
|
],
|
|
"end": [
|
|
5,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
10
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'c' identifier with the 'two' identifier in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index 8aab74f1..fcdc3127 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-var a int",
|
|
"-var b, c uint64",
|
|
"+var zero int",
|
|
"+var one, two uint64",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "92f1dde57fd8b6dc1832eae0799399b8a5959358..9b83661f3c9ba6ad69dcd7a4ff5d2f6b48c5afcc"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
5
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
10
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'two' variable in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index fcdc3127..79058077 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,6 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-var zero int",
|
|
"-var one, two uint64",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "9b83661f3c9ba6ad69dcd7a4ff5d2f6b48c5afcc..35de76238d81875c391a6a006ac49df6da62dd7e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index 79058077..e69de29b 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "35de76238d81875c391a6a006ac49df6da62dd7e..cb70743c2dadaed8a2d43a98a43b66b8e8798eed"
|
|
}]
|