1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/go/var-declarations-with-no-expressions.json
2016-12-07 15:41:28 -05:00

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 e69de29..7905807 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": "9fb0684b7bb7fda2c88d6ed343f225a1fd288943..7b32563b9174f907368c799d1cc5803f7cbcbd5b"
}
,{
"testCaseDescription": "go-var-declarations-with-no-expressions-insert-test",
"expectedResult": {
"changes": {
"var-declarations-with-no-expressions.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
13
]
}
},
"summary": "Added the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
20
]
}
},
"summary": "Added the 'one' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
20
]
}
},
"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 7905807..fcdc312 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": "7b32563b9174f907368c799d1cc5803f7cbcbd5b..7b4652f02c7c3f647a728e83f5da83c8fbfca906"
}
,{
"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 fcdc312..8aab74f 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": "7b4652f02c7c3f647a728e83f5da83c8fbfca906..ab2723c0b47bbfe82319ed4a63d1dccb2747123a"
}
,{
"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 8aab74f..fcdc312 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": "ab2723c0b47bbfe82319ed4a63d1dccb2747123a..f3371e2517c4e2b6d33160d5e3cfc67dffa65f01"
}
,{
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"var-declarations-with-no-expressions.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
13
]
}
},
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
20
]
}
},
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
20
]
}
},
"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 fcdc312..7905807 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": "f3371e2517c4e2b6d33160d5e3cfc67dffa65f01..2c1295254a0540527746e7f6b490b9ed7b866802"
}
,{
"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 7905807..e69de29 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": "2c1295254a0540527746e7f6b490b9ed7b866802..13001c71f5bd6f01f36c4ae50245b1e458c5fc68"
}]