1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00
semantic/test/corpus/diff-summaries/go/selector-expressions.json
2016-12-07 15:41:28 -05:00

389 lines
12 KiB
JSON

[{
"testCaseDescription": "go-selector-expressions-setup-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index e69de29..7905807 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "57d9560deb9f33dd0b67379bbb8c35b4cba3f723..1b42ecce20eec49077eaade7934c36cae96132b6"
}
,{
"testCaseDescription": "go-selector-expressions-insert-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
8
]
}
},
"summary": "Added the 'a[b][c]()' function call in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 7905807..8b4c745 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+a.b.c()",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1b42ecce20eec49077eaade7934c36cae96132b6..04919483b16b89efdc1c53dd9178039ef4855223"
}
,{
"testCaseDescription": "go-selector-expressions-replacement-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
3
],
"end": [
4,
4
]
},
{
"start": [
4,
3
],
"end": [
4,
4
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
5
],
"end": [
4,
6
]
},
{
"start": [
4,
5
],
"end": [
4,
6
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'z' identifier in the x[y][z] subscript access of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 8b4c745..0e519e3 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a.b.c()",
"+x.y.z()",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "04919483b16b89efdc1c53dd9178039ef4855223..9514b19af1cdc25299cb9afc30a0aec7882e33a7"
}
,{
"testCaseDescription": "go-selector-expressions-delete-replacement-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
3
],
"end": [
4,
4
]
},
{
"start": [
4,
3
],
"end": [
4,
4
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
5
],
"end": [
4,
6
]
},
{
"start": [
4,
5
],
"end": [
4,
6
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'c' identifier in the a[b][c] subscript access of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 0e519e3..8b4c745 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-x.y.z()",
"+a.b.c()",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "9514b19af1cdc25299cb9afc30a0aec7882e33a7..fe7246b07ff7534399715b1ee43818b84eecc76b"
}
,{
"testCaseDescription": "go-selector-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
8
]
}
},
"summary": "Deleted the 'a[b][c]()' function call in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 8b4c745..7905807 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a.b.c()",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "fe7246b07ff7534399715b1ee43818b84eecc76b..e96c8bbae1eba778f6a07c73592453900cba9405"
}
,{
"testCaseDescription": "go-selector-expressions-teardown-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 7905807..e69de29 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "e96c8bbae1eba778f6a07c73592453900cba9405..0547e4f3b783144a6c3127cec4633baec35a668b"
}]