1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +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": "90946cc17dc1cb231424285c1dceb47e245b4d32..6c386ab5ae9d3f9da97688d20373748cb4becf6f"
}
,{
"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": "6c386ab5ae9d3f9da97688d20373748cb4becf6f..c611ee2aa26066ad9818fbbb049f9dbddf9025be"
}
,{
"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": "c611ee2aa26066ad9818fbbb049f9dbddf9025be..f02279be0acbedf59ddce9fd0e2e4c3ce29dae77"
}
,{
"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": "f02279be0acbedf59ddce9fd0e2e4c3ce29dae77..27335a46631e0c966d650bab1a36eaa08b8ec274"
}
,{
"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": "27335a46631e0c966d650bab1a36eaa08b8ec274..33fa0008d82f2ffea8d3050789920fd2e9405ce7"
}
,{
"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": "33fa0008d82f2ffea8d3050789920fd2e9405ce7..794499a21a7ed916a84f76c331eac1ee7e70fd0d"
}
,{
"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": "794499a21a7ed916a84f76c331eac1ee7e70fd0d..249a12978e1b6b4172e7c40ef388694f586abca8"
}]