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/const-with-implicit-values.json
2017-01-10 16:21:35 -05:00

467 lines
15 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": "f704d2bd8966ae7d92086ff1eb25cb92b5024fb1..482a8e29b634aadf03cb9866122dc9d4206694e4"
}
,{
"testCaseDescription": "go-const-with-implicit-values-insert-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"insert": {
"start": [
5,
2
],
"end": [
5,
13
]
}
},
"summary": "Added the 'zero' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
2
],
"end": [
6,
5
]
}
},
"summary": "Added the 'one' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
7,
2
],
"end": [
7,
5
]
}
},
"summary": "Added 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 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": "482a8e29b634aadf03cb9866122dc9d4206694e4..e811d7d937685e7c457cf89642470ffe98744d2b"
}
,{
"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 a var assignment of the 'main' function"
},
{
"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": "e811d7d937685e7c457cf89642470ffe98744d2b..b168fbd55e637a9b7496cdad4d3062ed39cd73ce"
}
,{
"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 zero var assignment of the 'main' function"
},
{
"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": "b168fbd55e637a9b7496cdad4d3062ed39cd73ce..46997449a9a81c58dcab5a164f241b423bf17e42"
}
,{
"testCaseDescription": "go-const-with-implicit-values-delete-insert-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"delete": {
"start": [
5,
2
],
"end": [
5,
13
]
}
},
"summary": "Deleted the 'zero' var assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
2
],
"end": [
6,
5
]
}
},
"summary": "Deleted the 'one' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
7,
2
],
"end": [
7,
5
]
}
},
"summary": "Deleted 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 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": "46997449a9a81c58dcab5a164f241b423bf17e42..f9a2da0ffeb09cfd53b4976939e22cdc783340e3"
}
,{
"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": "f9a2da0ffeb09cfd53b4976939e22cdc783340e3..ff5d3a1324e7b7bc4a2f7491948e240af9bb6325"
}]