1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/go/indexing-expressions.json
2017-01-17 15:26:07 -05:00

588 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 e69de29b..79058077 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "efcf789858ec7ef3093d8b8c90b40e9590b8a605..f69740ac9317c7f1177454ce1e08a67b254bb9b9"
}
,{
"testCaseDescription": "go-indexing-expressions-insert-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
5
]
}
},
"summary": "Added the 'a[1]' index expression in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
2
],
"end": [
5,
6
]
}
},
"summary": "Added the 'b[b[:]]' slice literal in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
2
],
"end": [
6,
7
]
}
},
"summary": "Added the 'c[1]' slice literal in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
7,
2
],
"end": [
7,
8
]
}
},
"summary": "Added the 'd[1:2]' slice literal in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
8,
2
],
"end": [
8,
9
]
}
},
"summary": "Added the 'e[2:3]' slice literal in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
9,
2
],
"end": [
9,
10
]
}
},
"summary": "Added the 'f[1:2:3]' slice literal 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 79058077..c2c76934 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": "f69740ac9317c7f1177454ce1e08a67b254bb9b9..36a0bad549c1bba7a60c59d2773ed420937a6b5b"
}
,{
"testCaseDescription": "go-indexing-expressions-replacement-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
6
]
}
},
"summary": "Added the 'z[2]' slice literal in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
2
],
"end": [
5,
7
]
}
},
"summary": "Added the 'y[1]' slice literal in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
2
],
"end": [
6,
7
]
}
},
"summary": "Added the 'x[1]' slice literal in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
5
]
}
},
"summary": "Deleted the 'a[1]' index expression in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
2
],
"end": [
5,
6
]
}
},
"summary": "Deleted the 'b[b[:]]' slice literal in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
2
],
"end": [
6,
7
]
}
},
"summary": "Deleted the 'c[1]' slice literal 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 c2c76934..68a76340 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": "36a0bad549c1bba7a60c59d2773ed420937a6b5b..4bf1febcaf31ccc283c7f6a436de0503d6ced94f"
}
,{
"testCaseDescription": "go-indexing-expressions-delete-replacement-test",
"expectedResult": {
"changes": {
"indexing-expressions.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
5
]
}
},
"summary": "Added the 'a[1]' index expression in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
5,
2
],
"end": [
5,
3
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'b' identifier in the b[b[:]] slice literal of the 'main' function"
},
{
"span": {
"delete": {
"start": [
4,
4
],
"end": [
4,
5
]
}
},
"summary": "Deleted '2' in the b[b[:]] slice literal of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
2
],
"end": [
5,
3
]
},
{
"start": [
6,
2
],
"end": [
6,
3
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'c' identifier in the c[1] slice literal of the 'main' function"
},
{
"span": {
"delete": {
"start": [
6,
2
],
"end": [
6,
7
]
}
},
"summary": "Deleted the 'x[1]' slice literal 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 68a76340..c2c76934 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": "4bf1febcaf31ccc283c7f6a436de0503d6ced94f..7eec09a12df35db5e1152687d5ed7c2ef0c53ff2"
}
,{
"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]' index expression in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
2
],
"end": [
5,
6
]
}
},
"summary": "Deleted the 'b[b[:]]' slice literal in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
2
],
"end": [
6,
7
]
}
},
"summary": "Deleted the 'c[1]' slice literal in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
7,
2
],
"end": [
7,
8
]
}
},
"summary": "Deleted the 'd[1:2]' slice literal in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
8,
2
],
"end": [
8,
9
]
}
},
"summary": "Deleted the 'e[2:3]' slice literal in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
9,
2
],
"end": [
9,
10
]
}
},
"summary": "Deleted the 'f[1:2:3]' slice literal 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 c2c76934..79058077 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": "7eec09a12df35db5e1152687d5ed7c2ef0c53ff2..f1621a2c7b5589d3c476c11201d2769500d891c0"
}
,{
"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 79058077..e69de29b 100644",
"--- a/indexing-expressions.go",
"+++ b/indexing-expressions.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "f1621a2c7b5589d3c476c11201d2769500d891c0..dfd96daa75b1b404d313721c1f5304a9c39ed793"
}]