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/call-expressions.json
2017-01-25 20:27:46 -05:00

509 lines
16 KiB
JSON

[{
"testCaseDescription": "go-call-expressions-setup-test",
"expectedResult": {
"changes": {
"call-expressions.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": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index e69de29b..79058077 100644",
"--- a/call-expressions.go",
"+++ b/call-expressions.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "d466cac08ed7e913f228ce5d3554f80d255d9877..b07bb206b105efbf9b3d8ce0f59396c1270d2842"
}
,{
"testCaseDescription": "go-call-expressions-insert-test",
"expectedResult": {
"changes": {
"call-expressions.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
11
]
}
},
"summary": "Added the 'x(b, c)' function call in the main function"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Added the 'y(b, c)' function call in the main function"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
11
]
}
},
"summary": "Added the 'z(b, c)' function call in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index 79058077..72918e59 100644",
"--- a/call-expressions.go",
"+++ b/call-expressions.go",
"@@ -1,5 +1,7 @@",
" package main",
" ",
" func main() {",
"-",
"+x(b, c...)",
"+y(b, c,)",
"+z(b,c...,)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "b07bb206b105efbf9b3d8ce0f59396c1270d2842..4b8c6d857030bd050f45691892402f21b1db86b3"
}
,{
"testCaseDescription": "go-call-expressions-replacement-test",
"expectedResult": {
"changes": {
"call-expressions.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
11
]
}
},
"summary": "Added the 'a(b, c)' function call in the main function"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Added the 'b(b, c)' function call in the main function"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
11
]
}
},
"summary": "Added the 'c(b, c)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
11
]
}
},
"summary": "Deleted the 'x(b, c)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Deleted the 'y(b, c)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
11
]
}
},
"summary": "Deleted the 'z(b, c)' function call in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index 72918e59..2d5e765c 100644",
"--- a/call-expressions.go",
"+++ b/call-expressions.go",
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
"-x(b, c...)",
"-y(b, c,)",
"-z(b,c...,)",
"+a(b, c...)",
"+b(b, c,)",
"+c(b,c...,)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "4b8c6d857030bd050f45691892402f21b1db86b3..fb5cfee9be4a4a1813a197c6f12167ebda980e69"
}
,{
"testCaseDescription": "go-call-expressions-delete-replacement-test",
"expectedResult": {
"changes": {
"call-expressions.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
11
]
}
},
"summary": "Added the 'x(b, c)' function call in the main function"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Added the 'y(b, c)' function call in the main function"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
11
]
}
},
"summary": "Added the 'z(b, c)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
11
]
}
},
"summary": "Deleted the 'a(b, c)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Deleted the 'b(b, c)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
11
]
}
},
"summary": "Deleted the 'c(b, c)' function call in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index 2d5e765c..72918e59 100644",
"--- a/call-expressions.go",
"+++ b/call-expressions.go",
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
"-a(b, c...)",
"-b(b, c,)",
"-c(b,c...,)",
"+x(b, c...)",
"+y(b, c,)",
"+z(b,c...,)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "fb5cfee9be4a4a1813a197c6f12167ebda980e69..024c8cedf587e46b7401a64c73e65cde916a5e2f"
}
,{
"testCaseDescription": "go-call-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"call-expressions.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
11
]
}
},
"summary": "Deleted the 'x(b, c)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Deleted the 'y(b, c)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
11
]
}
},
"summary": "Deleted the 'z(b, c)' function call in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index 72918e59..79058077 100644",
"--- a/call-expressions.go",
"+++ b/call-expressions.go",
"@@ -1,7 +1,5 @@",
" package main",
" ",
" func main() {",
"-x(b, c...)",
"-y(b, c,)",
"-z(b,c...,)",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "024c8cedf587e46b7401a64c73e65cde916a5e2f..0d61d6956e3e287b4da25b9bd476aebda316ca62"
}
,{
"testCaseDescription": "go-call-expressions-teardown-test",
"expectedResult": {
"changes": {
"call-expressions.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": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index 79058077..e69de29b 100644",
"--- a/call-expressions.go",
"+++ b/call-expressions.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "0d61d6956e3e287b4da25b9bd476aebda316ca62..29a926b992e14be79f37cee8527accea6ed82ebd"
}]