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/variadic-function-declarations.json
2017-01-27 14:50:27 -05:00

489 lines
16 KiB
JSON

[{
"testCaseDescription": "go-variadic-function-declarations-setup-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.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": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index e69de29b..b97dec38 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -0,0 +1,6 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}",
"+"
],
"gitDir": "test/corpus/repos/go",
"shas": "f8ed575cd3abeb71f43cabe4c63c8a6b17126e1b..c688c0b2381644bce3ef1bc173162b8b415279bd"
}
,{
"testCaseDescription": "go-variadic-function-declarations-insert-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
22
]
}
},
"summary": "Added the 'f1' function"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
19
]
}
},
"summary": "Added the 'f2' function"
},
{
"span": {
"insert": {
"start": [
8,
1
],
"end": [
8,
23
]
}
},
"summary": "Added the 'f3' function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index b97dec38..6bdb4e0a 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,4 +3,6 @@ package main",
" func main() {",
" ",
" }",
"-",
"+func f1(a ...*int) {}",
"+func f2(...int) {}",
"+func f3(a, ...bool) {}"
],
"gitDir": "test/corpus/repos/go",
"shas": "c688c0b2381644bce3ef1bc173162b8b415279bd..fc3a36b18d4b91a5c3e56ffe5ef64997b9c80d8e"
}
,{
"testCaseDescription": "go-variadic-function-declarations-replacement-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"replace": [
{
"start": [
6,
6
],
"end": [
6,
8
]
},
{
"start": [
6,
6
],
"end": [
6,
8
]
}
]
},
"summary": "Replaced the 'f1' identifier with the 'g1' identifier in the g1 function"
},
{
"span": {
"replace": [
{
"start": [
7,
6
],
"end": [
7,
8
]
},
{
"start": [
7,
6
],
"end": [
7,
8
]
}
]
},
"summary": "Replaced the 'f2' identifier with the 'g2' identifier in the g2 function"
},
{
"span": {
"replace": [
{
"start": [
8,
6
],
"end": [
8,
8
]
},
{
"start": [
8,
6
],
"end": [
8,
8
]
}
]
},
"summary": "Replaced the 'f3' identifier with the 'g3' identifier in the g3 function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index 6bdb4e0a..ecc181af 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,6 +3,6 @@ package main",
" func main() {",
" ",
" }",
"-func f1(a ...*int) {}",
"-func f2(...int) {}",
"-func f3(a, ...bool) {}",
"+func g1(a ...*int) {}",
"+func g2(...int) {}",
"+func g3(a, ...bool) {}"
],
"gitDir": "test/corpus/repos/go",
"shas": "fc3a36b18d4b91a5c3e56ffe5ef64997b9c80d8e..802b6a78df3e44e2aeeaa8631ec76fbe80528faa"
}
,{
"testCaseDescription": "go-variadic-function-declarations-delete-replacement-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"replace": [
{
"start": [
6,
6
],
"end": [
6,
8
]
},
{
"start": [
6,
6
],
"end": [
6,
8
]
}
]
},
"summary": "Replaced the 'g1' identifier with the 'f1' identifier in the f1 function"
},
{
"span": {
"replace": [
{
"start": [
7,
6
],
"end": [
7,
8
]
},
{
"start": [
7,
6
],
"end": [
7,
8
]
}
]
},
"summary": "Replaced the 'g2' identifier with the 'f2' identifier in the f2 function"
},
{
"span": {
"replace": [
{
"start": [
8,
6
],
"end": [
8,
8
]
},
{
"start": [
8,
6
],
"end": [
8,
8
]
}
]
},
"summary": "Replaced the 'g3' identifier with the 'f3' identifier in the f3 function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index ecc181af..6bdb4e0a 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,6 +3,6 @@ package main",
" func main() {",
" ",
" }",
"-func g1(a ...*int) {}",
"-func g2(...int) {}",
"-func g3(a, ...bool) {}",
"+func f1(a ...*int) {}",
"+func f2(...int) {}",
"+func f3(a, ...bool) {}"
],
"gitDir": "test/corpus/repos/go",
"shas": "802b6a78df3e44e2aeeaa8631ec76fbe80528faa..6822004a85d2fcd4296419bd3392186555517ba6"
}
,{
"testCaseDescription": "go-variadic-function-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
22
]
}
},
"summary": "Deleted the 'f1' function"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
19
]
}
},
"summary": "Deleted the 'f2' function"
},
{
"span": {
"delete": {
"start": [
8,
1
],
"end": [
8,
23
]
}
},
"summary": "Deleted the 'f3' function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index 6bdb4e0a..b97dec38 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,6 +3,4 @@ package main",
" func main() {",
" ",
" }",
"-func f1(a ...*int) {}",
"-func f2(...int) {}",
"-func f3(a, ...bool) {}",
"+"
],
"gitDir": "test/corpus/repos/go",
"shas": "6822004a85d2fcd4296419bd3392186555517ba6..92897260968e62238c31a3f5697dd05109f1cc7a"
}
,{
"testCaseDescription": "go-variadic-function-declarations-teardown-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.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": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index b97dec38..e69de29b 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -1,6 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}",
"-"
],
"gitDir": "test/corpus/repos/go",
"shas": "92897260968e62238c31a3f5697dd05109f1cc7a..5864262d53932911f6e8fe7b9a96b553e611f3e9"
}]