1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/go/const-with-implicit-values.json
2017-01-09 15:13:55 -05:00

497 lines
16 KiB
JSON

[{
"testCaseDescription": "go-const-with-implicit-values-setup-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"const-with-implicit-values.go"
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index e69de29..7905807 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "b7637a4dc4d11f51d1f7721cf7201163c18b957d..73ffde0dbe40eacf767f74622d022f06895a03fa"
}
,{
"testCaseDescription": "go-const-with-implicit-values-insert-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
8,
3
]
}
},
"summary": "Added the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
8,
3
]
}
},
"summary": "Added the 'iota' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
8,
3
]
}
},
"summary": "Added the 'one' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
8,
3
]
}
},
"summary": "Added the 'two' variable in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"const-with-implicit-values.go"
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index 7905807..d98ee4c 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -1,5 +1,9 @@",
" package main",
" ",
" func main() {",
"-",
"+const (",
"+ zero = iota",
"+ one",
"+ two",
"+ )",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "73ffde0dbe40eacf767f74622d022f06895a03fa..ea00d4d813b5b4b8bdaa33216b184a85d8c4d2c4"
}
,{
"testCaseDescription": "go-const-with-implicit-values-replacement-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"replace": [
{
"start": [
5,
2
],
"end": [
5,
6
]
},
{
"start": [
5,
2
],
"end": [
5,
3
]
}
]
},
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
6,
2
],
"end": [
6,
5
]
},
{
"start": [
6,
2
],
"end": [
6,
3
]
}
]
},
"summary": "Replaced the 'one' identifier with the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
2
],
"end": [
7,
5
]
},
{
"start": [
7,
2
],
"end": [
7,
3
]
}
]
},
"summary": "Replaced the 'two' identifier with the 'c' identifier in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"const-with-implicit-values.go"
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index d98ee4c..c4c9127 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -2,8 +2,8 @@ package main",
" ",
" func main() {",
" const (",
"- zero = iota",
"- one",
"- two",
"+ a = iota",
"+ b",
"+ c",
" )",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "ea00d4d813b5b4b8bdaa33216b184a85d8c4d2c4..005cf4b3819ffc2c25c00d4c2d208fcc77cf1979"
}
,{
"testCaseDescription": "go-const-with-implicit-values-delete-replacement-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"replace": [
{
"start": [
5,
2
],
"end": [
5,
3
]
},
{
"start": [
5,
2
],
"end": [
5,
6
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
6,
2
],
"end": [
6,
3
]
},
{
"start": [
6,
2
],
"end": [
6,
5
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'one' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
2
],
"end": [
7,
3
]
},
{
"start": [
7,
2
],
"end": [
7,
5
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'two' identifier in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"const-with-implicit-values.go"
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index c4c9127..d98ee4c 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -2,8 +2,8 @@ package main",
" ",
" func main() {",
" const (",
"- a = iota",
"- b",
"- c",
"+ zero = iota",
"+ one",
"+ two",
" )",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "005cf4b3819ffc2c25c00d4c2d208fcc77cf1979..4aa54b5c35f548d8a307070b07606dbd12df4359"
}
,{
"testCaseDescription": "go-const-with-implicit-values-delete-insert-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
8,
3
]
}
},
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
8,
3
]
}
},
"summary": "Deleted the 'iota' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
8,
3
]
}
},
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
8,
3
]
}
},
"summary": "Deleted the 'two' variable in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"const-with-implicit-values.go"
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index d98ee4c..7905807 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -1,9 +1,5 @@",
" package main",
" ",
" func main() {",
"-const (",
"- zero = iota",
"- one",
"- two",
"- )",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "4aa54b5c35f548d8a307070b07606dbd12df4359..29131eeff95c28b49b26a90a5f80b41d3043d063"
}
,{
"testCaseDescription": "go-const-with-implicit-values-teardown-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"const-with-implicit-values.go"
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index 7905807..e69de29 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "29131eeff95c28b49b26a90a5f80b41d3043d063..bf4d7cb4ed054afd151ae1183f560bec67068c8e"
}]