1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00
semantic/test/corpus/diff-summaries/go/call-expressions.json
2016-12-07 15:41:28 -05:00

461 lines
15 KiB
JSON

[{
"testCaseDescription": "go-call-expressions-setup-test",
"expectedResult": {
"changes": {
"call-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index e69de29..7905807 100644",
"--- a/call-expressions.go",
"+++ b/call-expressions.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "9cddb8e9fccfae3f281ea8483dda6a75ce8138bd..0c490bd754f38a7d6c93037d41088a8da7565b8b"
}
,{
"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 of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Added the 'y(b, c)' function call in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
11
]
}
},
"summary": "Added the 'z(b, c)' function call in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index 7905807..72918e5 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": "0c490bd754f38a7d6c93037d41088a8da7565b8b..069082c1b718c460cc402a18166ce45cf3c7f44e"
}
,{
"testCaseDescription": "go-call-expressions-replacement-test",
"expectedResult": {
"changes": {
"call-expressions.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a(b, c) function call of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
1
],
"end": [
5,
2
]
},
{
"start": [
5,
1
],
"end": [
5,
2
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b(b, c) function call of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
1
],
"end": [
6,
2
]
},
{
"start": [
6,
1
],
"end": [
6,
2
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'c' identifier in the c(b, c) function call of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index 72918e5..2d5e765 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": "069082c1b718c460cc402a18166ce45cf3c7f44e..e24940ff9b674264aa3fd39a5d771ade72f17a83"
}
,{
"testCaseDescription": "go-call-expressions-delete-replacement-test",
"expectedResult": {
"changes": {
"call-expressions.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x(b, c) function call of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
1
],
"end": [
5,
2
]
},
{
"start": [
5,
1
],
"end": [
5,
2
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y(b, c) function call of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
1
],
"end": [
6,
2
]
},
{
"start": [
6,
1
],
"end": [
6,
2
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'z' identifier in the z(b, c) function call of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index 2d5e765..72918e5 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": "e24940ff9b674264aa3fd39a5d771ade72f17a83..7d42dbe7ebbbe59ff9d2f377b2a04230f0789bdf"
}
,{
"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 of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Deleted the 'y(b, c)' function call in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
11
]
}
},
"summary": "Deleted the 'z(b, c)' function call in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index 72918e5..7905807 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": "7d42dbe7ebbbe59ff9d2f377b2a04230f0789bdf..45ab4885d877bf6a6cdc01f62f619048973180ee"
}
,{
"testCaseDescription": "go-call-expressions-teardown-test",
"expectedResult": {
"changes": {
"call-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"call-expressions.go"
],
"patch": [
"diff --git a/call-expressions.go b/call-expressions.go",
"index 7905807..e69de29 100644",
"--- a/call-expressions.go",
"+++ b/call-expressions.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "45ab4885d877bf6a6cdc01f62f619048973180ee..e381d914055fbd5c1b070981b3f458cb7e44ce3e"
}]