1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/go/selector-expressions.json
2017-01-11 15:28:58 -08: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": "ddf3ce8b6c6271e3153414e94c2a5ed576525b3f..f65051e093ea9f1b853ad6607b0627bc4b467b71"
}
,{
"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": "f65051e093ea9f1b853ad6607b0627bc4b467b71..9e976318322531cbe98ab23f961842da2c2fb84a"
}
,{
"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": "9e976318322531cbe98ab23f961842da2c2fb84a..afd5153ab50147c234de8b3757736f30d7efe411"
}
,{
"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": "afd5153ab50147c234de8b3757736f30d7efe411..923206e8a0cd792702477ec1e1e7ab12bc3488c0"
}
,{
"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": "923206e8a0cd792702477ec1e1e7ab12bc3488c0..322dd4b61decf7a69223fa122f238e7001c5510d"
}
,{
"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": "322dd4b61decf7a69223fa122f238e7001c5510d..eb22590bba5cac2db7b478012ad0ab6e980f7317"
}]