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
2016-11-10 16:19:53 -05:00

728 lines
24 KiB
JSON

[{
"testCaseDescription": "go-variadic-function-declarations-insert-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Added the 'f1' function"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
19
]
}
},
"summary": "Added the 'f2' function"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
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 e69de29..e9d461f 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -0,0 +1,3 @@",
"+func f1(a ...*int) {}",
"+func f2(...int) {}",
"+func f3(a, ...bool) {}"
],
"gitDir": "test/corpus/repos/go",
"shas": "256c131008b104fa15d57c0f3ff56131c11337fe..b6ef32833f1cf331e26caedfd359c593f9b370b9"
}
,{
"testCaseDescription": "go-variadic-function-declarations-replacement-insert-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Added the 'g1' function"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
19
]
}
},
"summary": "Added the 'g2' function"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
23
]
}
},
"summary": "Added the 'g3' function"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
22
]
}
},
"summary": "Added the 'f1' function"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
19
]
}
},
"summary": "Added the 'f2' function"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
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 e9d461f..1e4f816 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -1,3 +1,9 @@",
"+func g1(a ...*int) {}",
"+func g2(...int) {}",
"+func g3(a, ...bool) {}",
"+func f1(a ...*int) {}",
"+func f2(...int) {}",
"+func f3(a, ...bool) {}",
" func f1(a ...*int) {}",
" func f2(...int) {}",
" func f3(a, ...bool) {}"
],
"gitDir": "test/corpus/repos/go",
"shas": "b6ef32833f1cf331e26caedfd359c593f9b370b9..ef0f85884738262f219743f46d645a73d12f5b99"
}
,{
"testCaseDescription": "go-variadic-function-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"replace": [
{
"start": [
1,
6
],
"end": [
1,
8
]
},
{
"start": [
1,
6
],
"end": [
1,
8
]
}
]
},
"summary": "Replaced the 'g1' identifier with the 'f1' identifier in the f1 function"
},
{
"span": {
"replace": [
{
"start": [
2,
6
],
"end": [
2,
8
]
},
{
"start": [
2,
6
],
"end": [
2,
8
]
}
]
},
"summary": "Replaced the 'g2' identifier with the 'f2' identifier in the f2 function"
},
{
"span": {
"replace": [
{
"start": [
3,
6
],
"end": [
3,
8
]
},
{
"start": [
3,
6
],
"end": [
3,
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 1e4f816..3198ec6 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -1,6 +1,6 @@",
"-func g1(a ...*int) {}",
"-func g2(...int) {}",
"-func g3(a, ...bool) {}",
"+func f1(a ...*int) {}",
"+func f2(...int) {}",
"+func f3(a, ...bool) {}",
" func f1(a ...*int) {}",
" func f2(...int) {}",
" func f3(a, ...bool) {}"
],
"gitDir": "test/corpus/repos/go",
"shas": "ef0f85884738262f219743f46d645a73d12f5b99..6920ba9ae6296e24e09e55ea342020521f5443b7"
}
,{
"testCaseDescription": "go-variadic-function-declarations-replacement-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"replace": [
{
"start": [
1,
6
],
"end": [
1,
8
]
},
{
"start": [
1,
6
],
"end": [
1,
8
]
}
]
},
"summary": "Replaced the 'f1' identifier with the 'g1' identifier in the g1 function"
},
{
"span": {
"replace": [
{
"start": [
2,
6
],
"end": [
2,
8
]
},
{
"start": [
2,
6
],
"end": [
2,
8
]
}
]
},
"summary": "Replaced the 'f2' identifier with the 'g2' identifier in the g2 function"
},
{
"span": {
"replace": [
{
"start": [
3,
6
],
"end": [
3,
8
]
},
{
"start": [
3,
6
],
"end": [
3,
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 3198ec6..1e4f816 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -1,6 +1,6 @@",
"-func f1(a ...*int) {}",
"-func f2(...int) {}",
"-func f3(a, ...bool) {}",
"+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": "6920ba9ae6296e24e09e55ea342020521f5443b7..ffa8638d6bc29fe639cc3a3bdcb94d61b5c35336"
}
,{
"testCaseDescription": "go-variadic-function-declarations-delete-replacement-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 'g1' function"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
19
]
}
},
"summary": "Deleted the 'g2' function"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
23
]
}
},
"summary": "Deleted the 'g3' function"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
22
]
}
},
"summary": "Deleted the 'f1' function"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
19
]
}
},
"summary": "Deleted the 'f2' function"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
23
]
}
},
"summary": "Deleted the 'f3' function"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
22
]
}
},
"summary": "Added the 'g1' function"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
19
]
}
},
"summary": "Added the 'g2' function"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
23
]
}
},
"summary": "Added the 'g3' function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index 1e4f816..99d1e54 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -1,9 +1,6 @@",
"-func g1(a ...*int) {}",
"-func g2(...int) {}",
"-func g3(a, ...bool) {}",
"-func f1(a ...*int) {}",
"-func f2(...int) {}",
"-func f3(a, ...bool) {}",
" 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": "ffa8638d6bc29fe639cc3a3bdcb94d61b5c35336..724f49666d07410a3e8ec439bb133609ed92d2aa"
}
,{
"testCaseDescription": "go-variadic-function-declarations-delete-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 'f1' function"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
19
]
}
},
"summary": "Deleted the 'f2' function"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
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 99d1e54..4a0a10b 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -1,6 +1,3 @@",
"-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": "724f49666d07410a3e8ec439bb133609ed92d2aa..6d26c7b498f60c3ccc84002c96dc08b024d685c7"
}
,{
"testCaseDescription": "go-variadic-function-declarations-delete-rest-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 'g1' function"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
19
]
}
},
"summary": "Deleted the 'g2' function"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
23
]
}
},
"summary": "Deleted the 'g3' function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index 4a0a10b..e69de29 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -1,3 +0,0 @@",
"-func g1(a ...*int) {}",
"-func g2(...int) {}",
"-func g3(a, ...bool) {}"
],
"gitDir": "test/corpus/repos/go",
"shas": "6d26c7b498f60c3ccc84002c96dc08b024d685c7..d533fb4333ed523cd36d6f2bb4f1c31eb61596f1"
}]