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
2017-01-10 16:21:35 -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": "7e245edb2be2900da66cfd024a2f94e687bbde8d..0e1dbdc533377d5a3decf443361a57037b93c049"
}
,{
"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": "0e1dbdc533377d5a3decf443361a57037b93c049..cb517d9574bcab65c8bc36932a3c5ea08b5dde73"
}
,{
"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": "cb517d9574bcab65c8bc36932a3c5ea08b5dde73..1b46978e8f9d3679e8f1a607674209786afb1494"
}
,{
"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": "1b46978e8f9d3679e8f1a607674209786afb1494..b7c6369fbb18a17c50a32ef0f09617dbd2c617a8"
}
,{
"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": "b7c6369fbb18a17c50a32ef0f09617dbd2c617a8..f862e55f46c2e2fa737cbd6bb622dc379b021fbe"
}
,{
"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": "f862e55f46c2e2fa737cbd6bb622dc379b021fbe..6b20e03f961607ab18c24b7b17f01ae02a746bc7"
}]