mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
456 lines
15 KiB
JSON
456 lines
15 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": "1b4a35f87087d1718b97eb8e7ea5f49b5ca174ec..2862242e78c02dfa736f3bad5af08f8eefd203ea"
|
|
}
|
|
,{
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"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": "2862242e78c02dfa736f3bad5af08f8eefd203ea..2a1c45cd4dc92f5e08722706171921b90571d8b8"
|
|
}
|
|
,{
|
|
"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": "2a1c45cd4dc92f5e08722706171921b90571d8b8..d658eee9ddf5ac443d61d8e64a9c394cd3a5b0d5"
|
|
}
|
|
,{
|
|
"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": "d658eee9ddf5ac443d61d8e64a9c394cd3a5b0d5..4821e2a047cd73bd612881159a5da01f3ac86329"
|
|
}
|
|
,{
|
|
"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": "4821e2a047cd73bd612881159a5da01f3ac86329..db6747174a33ae83142667799ff5f4960ca1d90c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-selector-expressions-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"selector-expressions.go": [
|
|
{
|
|
"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 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": "db6747174a33ae83142667799ff5f4960ca1d90c..b02d04ad34bf067ddc65366ca5ffddd90d1b2a25"
|
|
}
|
|
,{
|
|
"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": "b02d04ad34bf067ddc65366ca5ffddd90d1b2a25..5a80afc3c0dcecbaea8d511c091fd805defc43e3"
|
|
}]
|