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
2016-11-22 13:51:11 -05:00

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": "d0b42b7cad7f8e66272a8a4b36e3a58c48b939df..d32ac957301cff439df2d557e7bc5ebd76920c4d"
}
,{
"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": "d32ac957301cff439df2d557e7bc5ebd76920c4d..bbfebed8614bb711043d3df23f9c1a375b81a2ff"
}
,{
"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": "bbfebed8614bb711043d3df23f9c1a375b81a2ff..0fe9816441b136c83ac2235580fb8470177d936e"
}
,{
"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": "0fe9816441b136c83ac2235580fb8470177d936e..b55a064ac8294e9a9234cd68310a7b1eb9874fa6"
}
,{
"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": "b55a064ac8294e9a9234cd68310a7b1eb9874fa6..1288ecbf645002e561510e1192ef57f6ae00cb66"
}
,{
"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": "1288ecbf645002e561510e1192ef57f6ae00cb66..58ac838147e053167edaf821108ddbc5ca7827b6"
}
,{
"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": "58ac838147e053167edaf821108ddbc5ca7827b6..b352e08981a2c46b7f95fe4b0df553214d1d3859"
}]