1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
semantic/test/corpus/diff-summaries/go/indexing-expressions.json

1046 lines
33 KiB
JSON

[{
"testCaseDescription": "go-indexing-expressions-insert-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
5
]
}
},
"summary": "Added the 'a[1]' subscript access"
},
{
"span": {
"insert": {
"start": [
2,
2
],
"end": [
2,
6
]
}
},
"summary": "Added the 'b[b[:]]' subscript access"
},
{
"span": {
"insert": {
"start": [
3,
2
],
"end": [
3,
7
]
}
},
"summary": "Added the 'c[1]' subscript access"
},
{
"span": {
"insert": {
"start": [
4,
2
],
"end": [
4,
8
]
}
},
"summary": "Added the 'd[1:2]' subscript access"
},
{
"span": {
"insert": {
"start": [
5,
2
],
"end": [
5,
9
]
}
},
"summary": "Added the 'e[2:3]' subscript access"
},
{
"span": {
"insert": {
"start": [
6,
2
],
"end": [
6,
10
]
}
},
"summary": "Added the 'f[1:2:3]' subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index e69de29..7e17ae1 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -0,0 +1,6 @@",
"+a[1]",
"+ b[:]",
"+ c[1:]",
"+ d[1:2]",
"+ e[:2:3]",
"+ f[1:2:3]"
],
"gitDir": "test/corpus/repos/go",
"shas": "bef4b21e0fe9824b79e8b12bfa32867c8a4433a7..5e7291ca5734c392ca6fcb91affac41ee09b9fdb"
}
,{
"testCaseDescription": "go-indexing-expressions-replacement-insert-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Added the 'z[2]' subscript access"
},
{
"span": {
"insert": {
"start": [
2,
2
],
"end": [
2,
7
]
}
},
"summary": "Added the 'y[1]' subscript access"
},
{
"span": {
"insert": {
"start": [
3,
2
],
"end": [
3,
7
]
}
},
"summary": "Added the 'x[1]' subscript access"
},
{
"span": {
"insert": {
"start": [
4,
2
],
"end": [
4,
8
]
}
},
"summary": "Added the 'd[1:2]' subscript access"
},
{
"span": {
"insert": {
"start": [
5,
2
],
"end": [
5,
9
]
}
},
"summary": "Added the 'e[2:3]' subscript access"
},
{
"span": {
"insert": {
"start": [
6,
2
],
"end": [
6,
10
]
}
},
"summary": "Added the 'f[1:2:3]' subscript access"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
5
]
}
},
"summary": "Added the 'a[1]' subscript access"
},
{
"span": {
"insert": {
"start": [
8,
2
],
"end": [
8,
6
]
}
},
"summary": "Added the 'b[b[:]]' subscript access"
},
{
"span": {
"insert": {
"start": [
9,
2
],
"end": [
9,
7
]
}
},
"summary": "Added the 'c[1]' subscript access"
},
{
"span": {
"insert": {
"start": [
10,
2
],
"end": [
10,
8
]
}
},
"summary": "Added the 'd[1:2]' subscript access"
},
{
"span": {
"insert": {
"start": [
11,
2
],
"end": [
11,
9
]
}
},
"summary": "Added the 'e[2:3]' subscript access"
},
{
"span": {
"insert": {
"start": [
12,
2
],
"end": [
12,
10
]
}
},
"summary": "Added the 'f[1:2:3]' subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index 7e17ae1..4b30922 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,3 +1,15 @@",
"+z[:2]",
"+ y[:1]",
"+ x[1:]",
"+ d[1:2]",
"+ e[:2:3]",
"+ f[1:2:3]",
"+a[1]",
"+ b[:]",
"+ c[1:]",
"+ d[1:2]",
"+ e[:2:3]",
"+ f[1:2:3]",
" a[1]",
" b[:]",
" c[1:]"
],
"gitDir": "test/corpus/repos/go",
"shas": "5e7291ca5734c392ca6fcb91affac41ee09b9fdb..3c8fa3af2840693a46343d813503faf6af81f9bd"
}
,{
"testCaseDescription": "go-indexing-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
5
]
}
},
"summary": "Added the 'a[1]' subscript access"
},
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
2
]
},
{
"start": [
2,
2
],
"end": [
2,
3
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'b' identifier in the b[b[:]] subscript access"
},
{
"span": {
"delete": {
"start": [
1,
4
],
"end": [
1,
5
]
}
},
"summary": "Deleted '2' in the b[b[:]] subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
2
],
"end": [
2,
3
]
},
{
"start": [
3,
2
],
"end": [
3,
3
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'c' identifier in the c[1] subscript access"
},
{
"span": {
"delete": {
"start": [
3,
2
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'x[1]' subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index 4b30922..f5fa086 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,6 +1,6 @@",
"-z[:2]",
"- y[:1]",
"- x[1:]",
"+a[1]",
"+ b[:]",
"+ c[1:]",
" d[1:2]",
" e[:2:3]",
" f[1:2:3]"
],
"gitDir": "test/corpus/repos/go",
"shas": "3c8fa3af2840693a46343d813503faf6af81f9bd..a3a79c59817d668d35e8ec88c792d4873d2a8a3f"
}
,{
"testCaseDescription": "go-indexing-expressions-replacement-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
5
]
},
{
"start": [
1,
1
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced the 'a[1]' subscript access with the 'z[2]' subscript access"
},
{
"span": {
"insert": {
"start": [
2,
2
],
"end": [
2,
7
]
}
},
"summary": "Added the 'y[1]' subscript access"
},
{
"span": {
"insert": {
"start": [
3,
2
],
"end": [
3,
7
]
}
},
"summary": "Added the 'x[1]' subscript access"
},
{
"span": {
"delete": {
"start": [
2,
2
],
"end": [
2,
6
]
}
},
"summary": "Deleted the 'b[b[:]]' subscript access"
},
{
"span": {
"delete": {
"start": [
3,
2
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'c[1]' subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index f5fa086..4b30922 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,6 +1,6 @@",
"-a[1]",
"- b[:]",
"- c[1:]",
"+z[:2]",
"+ y[:1]",
"+ x[1:]",
" d[1:2]",
" e[:2:3]",
" f[1:2:3]"
],
"gitDir": "test/corpus/repos/go",
"shas": "a3a79c59817d668d35e8ec88c792d4873d2a8a3f..dc236572b5ccdd76b52fb233f568447dbd968f96"
}
,{
"testCaseDescription": "go-indexing-expressions-delete-replacement-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'z[2]' subscript access"
},
{
"span": {
"delete": {
"start": [
2,
2
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'y[1]' subscript access"
},
{
"span": {
"delete": {
"start": [
3,
2
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'x[1]' subscript access"
},
{
"span": {
"delete": {
"start": [
4,
2
],
"end": [
4,
8
]
}
},
"summary": "Deleted the 'd[1:2]' subscript access"
},
{
"span": {
"delete": {
"start": [
5,
2
],
"end": [
5,
9
]
}
},
"summary": "Deleted the 'e[2:3]' subscript access"
},
{
"span": {
"delete": {
"start": [
6,
2
],
"end": [
6,
10
]
}
},
"summary": "Deleted the 'f[1:2:3]' subscript access"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
6
]
}
},
"summary": "Added the 'z[2]' subscript access"
},
{
"span": {
"insert": {
"start": [
8,
2
],
"end": [
8,
7
]
}
},
"summary": "Added the 'y[1]' subscript access"
},
{
"span": {
"insert": {
"start": [
9,
2
],
"end": [
9,
7
]
}
},
"summary": "Added the 'x[1]' subscript access"
},
{
"span": {
"delete": {
"start": [
13,
1
],
"end": [
13,
5
]
}
},
"summary": "Deleted the 'a[1]' subscript access"
},
{
"span": {
"delete": {
"start": [
14,
2
],
"end": [
14,
6
]
}
},
"summary": "Deleted the 'b[b[:]]' subscript access"
},
{
"span": {
"delete": {
"start": [
15,
2
],
"end": [
15,
7
]
}
},
"summary": "Deleted the 'c[1]' subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index 4b30922..06ae51b 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,18 +1,12 @@",
"-z[:2]",
"- y[:1]",
"- x[1:]",
"- d[1:2]",
"- e[:2:3]",
"- f[1:2:3]",
" a[1]",
" b[:]",
" c[1:]",
" d[1:2]",
" e[:2:3]",
" f[1:2:3]",
"-a[1]",
"- b[:]",
"- c[1:]",
"+z[:2]",
"+ y[:1]",
"+ x[1:]",
" d[1:2]",
" e[:2:3]",
" f[1:2:3]"
],
"gitDir": "test/corpus/repos/go",
"shas": "dc236572b5ccdd76b52fb233f568447dbd968f96..6d08592be4d68c184299952ad89b6821c7f908fa"
}
,{
"testCaseDescription": "go-indexing-expressions-delete-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
5
]
}
},
"summary": "Deleted the 'a[1]' subscript access"
},
{
"span": {
"delete": {
"start": [
2,
2
],
"end": [
2,
6
]
}
},
"summary": "Deleted the 'b[b[:]]' subscript access"
},
{
"span": {
"delete": {
"start": [
3,
2
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'c[1]' subscript access"
},
{
"span": {
"delete": {
"start": [
4,
2
],
"end": [
4,
8
]
}
},
"summary": "Deleted the 'd[1:2]' subscript access"
},
{
"span": {
"delete": {
"start": [
5,
2
],
"end": [
5,
9
]
}
},
"summary": "Deleted the 'e[2:3]' subscript access"
},
{
"span": {
"delete": {
"start": [
6,
2
],
"end": [
6,
10
]
}
},
"summary": "Deleted the 'f[1:2:3]' subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index 06ae51b..920a809 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,9 +1,3 @@",
"-a[1]",
"- b[:]",
"- c[1:]",
"- d[1:2]",
"- e[:2:3]",
"- f[1:2:3]",
" z[:2]",
" y[:1]",
" x[1:]"
],
"gitDir": "test/corpus/repos/go",
"shas": "6d08592be4d68c184299952ad89b6821c7f908fa..c07e030b729c2ee13dbb2afd885a05677daf655e"
}
,{
"testCaseDescription": "go-indexing-expressions-delete-rest-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'z[2]' subscript access"
},
{
"span": {
"delete": {
"start": [
2,
2
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'y[1]' subscript access"
},
{
"span": {
"delete": {
"start": [
3,
2
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'x[1]' subscript access"
},
{
"span": {
"delete": {
"start": [
4,
2
],
"end": [
4,
8
]
}
},
"summary": "Deleted the 'd[1:2]' subscript access"
},
{
"span": {
"delete": {
"start": [
5,
2
],
"end": [
5,
9
]
}
},
"summary": "Deleted the 'e[2:3]' subscript access"
},
{
"span": {
"delete": {
"start": [
6,
2
],
"end": [
6,
10
]
}
},
"summary": "Deleted the 'f[1:2:3]' subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index 920a809..e69de29 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,6 +0,0 @@",
"-z[:2]",
"- y[:1]",
"- x[1:]",
"- d[1:2]",
"- e[:2:3]",
"- f[1:2:3]"
],
"gitDir": "test/corpus/repos/go",
"shas": "c07e030b729c2ee13dbb2afd885a05677daf655e..fff4b5e3aa207b2f8d5dc8ddb03b550f79baec95"
}]