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-12-07 13:26:31 -05:00

591 lines
19 KiB
JSON

[{
"testCaseDescription": "go-indexing-expressions-setup-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index e69de29..7905807 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "54d50ce002201d9b758fcd44c8c0cc7d2df914e0..7bd8ea7bdc8342f0c580370bd4a847d512c7c1a2"
}
,{
"testCaseDescription": "go-indexing-expressions-insert-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
5
]
}
},
"summary": "Added the 'a[1]' subscript access in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
2
],
"end": [
5,
6
]
}
},
"summary": "Added the 'b[b[:]]' subscript access in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
2
],
"end": [
6,
7
]
}
},
"summary": "Added the 'c[1]' subscript access in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
7,
2
],
"end": [
7,
8
]
}
},
"summary": "Added the 'd[1:2]' subscript access in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
8,
2
],
"end": [
8,
9
]
}
},
"summary": "Added the 'e[2:3]' subscript access in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
9,
2
],
"end": [
9,
10
]
}
},
"summary": "Added the 'f[1:2:3]' subscript access in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index 7905807..c2c7693 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,5 +1,10 @@",
" package main",
" ",
" func main() {",
"-",
"+a[1]",
"+ b[:]",
"+ c[1:]",
"+ d[1:2]",
"+ e[:2:3]",
"+ f[1:2:3]",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "7bd8ea7bdc8342f0c580370bd4a847d512c7c1a2..1154b3cc706dc8f22fa6daf6558b628d4c5ac04e"
}
,{
"testCaseDescription": "go-indexing-expressions-replacement-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
5
]
},
{
"start": [
4,
1
],
"end": [
4,
6
]
}
]
},
"summary": "Replaced the 'a[1]' subscript access with the 'z[2]' subscript access in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
5,
2
],
"end": [
5,
3
]
},
{
"start": [
5,
2
],
"end": [
5,
3
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y[1] subscript access of the 'main' function"
},
{
"span": {
"insert": {
"start": [
5,
5
],
"end": [
5,
6
]
}
},
"summary": "Added '1' in the y[1] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
2
],
"end": [
6,
3
]
},
{
"start": [
6,
2
],
"end": [
6,
3
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'x' identifier in the x[1] subscript access of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index c2c7693..68a7634 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,9 +1,9 @@",
" package main",
" ",
" func main() {",
"-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": "1154b3cc706dc8f22fa6daf6558b628d4c5ac04e..b3b38c4a28aeeb82d8e147918264a6bf8f5fd8d8"
}
,{
"testCaseDescription": "go-indexing-expressions-delete-replacement-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
6
]
},
{
"start": [
4,
1
],
"end": [
4,
5
]
}
]
},
"summary": "Replaced the 'z[2]' subscript access with the 'a[1]' subscript access in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
5,
2
],
"end": [
5,
3
]
},
{
"start": [
5,
2
],
"end": [
5,
3
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b[b[:]] subscript access of the 'main' function"
},
{
"span": {
"delete": {
"start": [
5,
5
],
"end": [
5,
6
]
}
},
"summary": "Deleted '1' in the b[b[:]] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
2
],
"end": [
6,
3
]
},
{
"start": [
6,
2
],
"end": [
6,
3
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'c' identifier in the c[1] subscript access of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index 68a7634..c2c7693 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,9 +1,9 @@",
" package main",
" ",
" func main() {",
"-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": "b3b38c4a28aeeb82d8e147918264a6bf8f5fd8d8..f05bb4e56c7e751ca0b3979e5052c7fac79e5933"
}
,{
"testCaseDescription": "go-indexing-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
5
]
}
},
"summary": "Deleted the 'a[1]' subscript access in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
2
],
"end": [
5,
6
]
}
},
"summary": "Deleted the 'b[b[:]]' subscript access in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
2
],
"end": [
6,
7
]
}
},
"summary": "Deleted the 'c[1]' subscript access in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
7,
2
],
"end": [
7,
8
]
}
},
"summary": "Deleted the 'd[1:2]' subscript access in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
8,
2
],
"end": [
8,
9
]
}
},
"summary": "Deleted the 'e[2:3]' subscript access in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
9,
2
],
"end": [
9,
10
]
}
},
"summary": "Deleted the 'f[1:2:3]' subscript access in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index c2c7693..7905807 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,10 +1,5 @@",
" package main",
" ",
" func main() {",
"-a[1]",
"- b[:]",
"- c[1:]",
"- d[1:2]",
"- e[:2:3]",
"- f[1:2:3]",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f05bb4e56c7e751ca0b3979e5052c7fac79e5933..234bbd4df8fa649115280c6bc6104de9d5e4b193"
}
,{
"testCaseDescription": "go-indexing-expressions-teardown-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"indexing-expressions.go"
],
"patch": [
"diff --git a/indexing-expressions.go b/indexing-expressions.go",
"index 7905807..e69de29 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "234bbd4df8fa649115280c6bc6104de9d5e4b193..8382ed38c473783e21fa743b27dc41b7a26fb135"
}]