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/array-with-implicit-length.json
2017-02-06 10:44:04 -05:00

428 lines
14 KiB
JSON

[{
"testCaseDescription": "go-array-with-implicit-length-setup-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Added the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index e69de29b..79058077 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "6a1ac7f651e7395fceb81ead8cb1338aacb11a8b..8d9a800c09402372bc03ed7f041c0a53df92cfbf"
}
,{
"testCaseDescription": "go-array-with-implicit-length-insert-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"insert": {
"start": [
4,
7
],
"end": [
4,
29
]
}
},
"summary": "Added the 'a1' var assignment in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index 79058077..a53dc8c5 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+const a1 = [...]int{1, 2, 3}",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "8d9a800c09402372bc03ed7f041c0a53df92cfbf..1e2513faf6c81e4735cbb262708f0cc116157363"
}
,{
"testCaseDescription": "go-array-with-implicit-length-replacement-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"insert": {
"start": [
4,
21
],
"end": [
4,
22
]
}
},
"summary": "Added '4' in the [...]int composite_literal of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
21
],
"end": [
4,
22
]
},
{
"start": [
4,
23
],
"end": [
4,
24
]
}
]
},
"summary": "Replaced '1' with '5' in the [...]int composite_literal of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
24
],
"end": [
4,
25
]
},
{
"start": [
4,
25
],
"end": [
4,
26
]
}
]
},
"summary": "Replaced '2' with '6' in the [...]int composite_literal of the 'main' function"
},
{
"span": {
"delete": {
"start": [
4,
27
],
"end": [
4,
28
]
}
},
"summary": "Deleted '3' in the [...]int composite_literal of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index a53dc8c5..e9e3d08f 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const a1 = [...]int{1, 2, 3}",
"+const a1 = [...]int{4,5,6}",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1e2513faf6c81e4735cbb262708f0cc116157363..f6662b44805b44761e6e4cd9e5153f4732967785"
}
,{
"testCaseDescription": "go-array-with-implicit-length-delete-replacement-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"insert": {
"start": [
4,
21
],
"end": [
4,
22
]
}
},
"summary": "Added '1' in the [...]int composite_literal of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
21
],
"end": [
4,
22
]
},
{
"start": [
4,
24
],
"end": [
4,
25
]
}
]
},
"summary": "Replaced '4' with '2' in the [...]int composite_literal of the 'main' function"
},
{
"span": {
"insert": {
"start": [
4,
27
],
"end": [
4,
28
]
}
},
"summary": "Added '3' in the [...]int composite_literal of the 'main' function"
},
{
"span": {
"delete": {
"start": [
4,
23
],
"end": [
4,
24
]
}
},
"summary": "Deleted '5' in the [...]int composite_literal of the 'main' function"
},
{
"span": {
"delete": {
"start": [
4,
25
],
"end": [
4,
26
]
}
},
"summary": "Deleted '6' in the [...]int composite_literal of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index e9e3d08f..a53dc8c5 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const a1 = [...]int{4,5,6}",
"+const a1 = [...]int{1, 2, 3}",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f6662b44805b44761e6e4cd9e5153f4732967785..8d73cd91a319f6d03de69af53e3f71b8290f6dad"
}
,{
"testCaseDescription": "go-array-with-implicit-length-delete-insert-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"delete": {
"start": [
4,
7
],
"end": [
4,
29
]
}
},
"summary": "Deleted the 'a1' var assignment in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index a53dc8c5..79058077 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const a1 = [...]int{1, 2, 3}",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "8d73cd91a319f6d03de69af53e3f71b8290f6dad..18535546086d46dddd77f6fa68c016855b69b152"
}
,{
"testCaseDescription": "go-array-with-implicit-length-teardown-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'main' module"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index 79058077..e69de29b 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "18535546086d46dddd77f6fa68c016855b69b152..9108a8d8413873f9238127978d9fd413c72b1d02"
}]