1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00
semantic/test/corpus/diff-summaries/go/selector-expressions.json
2017-01-09 15:13:55 -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": "95c931e493a7d347a01337613f6a8edcda9c72b9..6f6be11f5b48d2b7f6eb2b60b08aebdcc202f974"
}
,{
"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": "6f6be11f5b48d2b7f6eb2b60b08aebdcc202f974..909abe7e0fdb950af7f2cae20ecbd7b8709a4f68"
}
,{
"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": "909abe7e0fdb950af7f2cae20ecbd7b8709a4f68..4765c8f7ccea0fb468d045f7868e248dec250580"
}
,{
"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": "4765c8f7ccea0fb468d045f7868e248dec250580..a310b1b78db73260b98ec97e56e597c2c2b69544"
}
,{
"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": "a310b1b78db73260b98ec97e56e597c2c2b69544..f32de25d9ffe972e2695a592f32c83099c0f8704"
}
,{
"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": "f32de25d9ffe972e2695a592f32c83099c0f8704..3780a3748556cad489d07632c99242dd125a2d3d"
}]