mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
389 lines
12 KiB
JSON
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": "b7cef53a7c59fc2b88ba0a41658125f986c008e2..1d1e76b5a23f52a9d4d9a4e613df63a5a6486883"
|
|
}
|
|
,{
|
|
"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": "1d1e76b5a23f52a9d4d9a4e613df63a5a6486883..2e6df18435a75e078a79a0a5e44339380b354aa1"
|
|
}
|
|
,{
|
|
"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": "2e6df18435a75e078a79a0a5e44339380b354aa1..3fa6d37e446b9ace2aecf8ce7710600a208aa5a5"
|
|
}
|
|
,{
|
|
"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": "3fa6d37e446b9ace2aecf8ce7710600a208aa5a5..e2978c38d504eb925e11bad805a12a6303cf218c"
|
|
}
|
|
,{
|
|
"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": "e2978c38d504eb925e11bad805a12a6303cf218c..73fe621f3b693eca42f7814887f871fbdf691302"
|
|
}
|
|
,{
|
|
"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": "73fe621f3b693eca42f7814887f871fbdf691302..886b33d41824a470340628cf21c936e1b396a5b9"
|
|
}]
|