mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
516 lines
16 KiB
JSON
516 lines
16 KiB
JSON
[{
|
|
"testCaseDescription": "go-selector-expressions-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"selector-expressions.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a[b][c]()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"selector-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
|
"index e69de29..7be43f2 100644",
|
|
"--- a/selector-expressions.go",
|
|
"+++ b/selector-expressions.go",
|
|
"@@ -0,0 +1 @@",
|
|
"+a.b.c()"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "1b6e0feb56e5cdb7ad291617f2f0435417e65665..1cabbfb616bb7f16666511f145e8709354b162c1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-selector-expressions-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"selector-expressions.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[y][z]()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a[b][c]()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a[b][c]()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a[b][c]()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"selector-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
|
"index 7be43f2..4fa8605 100644",
|
|
"--- a/selector-expressions.go",
|
|
"+++ b/selector-expressions.go",
|
|
"@@ -1 +1,3 @@",
|
|
"+x.y.z()",
|
|
"+a.b.c()",
|
|
" a.b.c()"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "1cabbfb616bb7f16666511f145e8709354b162c1..9cd2e1fa67eaf8b7701eb693cbde0abf05a9acf2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-selector-expressions-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"selector-expressions.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'z' identifier with the 'c' identifier in the a[b][c] subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"selector-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
|
"index 4fa8605..2a586da 100644",
|
|
"--- a/selector-expressions.go",
|
|
"+++ b/selector-expressions.go",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x.y.z()",
|
|
"+a.b.c()",
|
|
" a.b.c()",
|
|
" a.b.c()"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "9cd2e1fa67eaf8b7701eb693cbde0abf05a9acf2..87e2a67ff089313ce73948c33f5fed26678e69e6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-selector-expressions-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"selector-expressions.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'c' identifier with the 'z' identifier in the x[y][z] subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"selector-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
|
"index 2a586da..4fa8605 100644",
|
|
"--- a/selector-expressions.go",
|
|
"+++ b/selector-expressions.go",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-a.b.c()",
|
|
"+x.y.z()",
|
|
" a.b.c()",
|
|
" a.b.c()"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "87e2a67ff089313ce73948c33f5fed26678e69e6..8288366db7745d5e945597239e1e3e9e7384f986"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-selector-expressions-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"selector-expressions.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[y][z]()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a[b][c]()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[y][z]()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"selector-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
|
"index 4fa8605..3e2d0bd 100644",
|
|
"--- a/selector-expressions.go",
|
|
"+++ b/selector-expressions.go",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-x.y.z()",
|
|
"-a.b.c()",
|
|
" a.b.c()",
|
|
"+x.y.z()"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "8288366db7745d5e945597239e1e3e9e7384f986..6320cb015ad06170d57469ad6117980fcf530917"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-selector-expressions-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"selector-expressions.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[y][z]()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a[b][c]()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[y][z]()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"selector-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
|
"index 3e2d0bd..00b9e7c 100644",
|
|
"--- a/selector-expressions.go",
|
|
"+++ b/selector-expressions.go",
|
|
"@@ -1,2 +1 @@",
|
|
"-a.b.c()",
|
|
" x.y.z()"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "6320cb015ad06170d57469ad6117980fcf530917..64072b885bd8b401823412418b0a634151fb012c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-selector-expressions-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"selector-expressions.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[y][z]()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"selector-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
|
"index 00b9e7c..e69de29 100644",
|
|
"--- a/selector-expressions.go",
|
|
"+++ b/selector-expressions.go",
|
|
"@@ -1 +0,0 @@",
|
|
"-x.y.z()"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "64072b885bd8b401823412418b0a634151fb012c..5e49cf8bc49a6acceee67258f44392614d3e2807"
|
|
}]
|