1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/go/call-expressions.json

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": "d5f8f49ab00e91cf9cf8a71dd94c14b3fa29aad8..0f348f4e761af93c4036be91a81c370254edab79"
}
,{
"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": "0f348f4e761af93c4036be91a81c370254edab79..8032ef9f0136e422475ec94f40416071beacb1b3"
}
,{
"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": "8032ef9f0136e422475ec94f40416071beacb1b3..8dda64263242afa2d8deb5d25140852ebfb07b71"
}
,{
"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": "8dda64263242afa2d8deb5d25140852ebfb07b71..dd71d5503cc5e5b1f7e85ccabd36d64c891e48d2"
}
,{
"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": "dd71d5503cc5e5b1f7e85ccabd36d64c891e48d2..a9a077abbee74593f4f64c4491602102a47e0f0d"
}
,{
"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": "a9a077abbee74593f4f64c4491602102a47e0f0d..cbd953ad26bc63e3ddd57f753a0d7bf09ed21706"
}]