1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00
semantic/test/corpus/diff-summaries/go/unary-expressions.json

401 lines
12 KiB
JSON
Raw Normal View History

2016-11-02 17:50:05 +03:00
[{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-unary-expressions-setup-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
2016-11-11 00:19:53 +03:00
"insert": {
"start": [
1,
1
],
"end": [
1,
13
2016-11-11 00:19:53 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'main' function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
2017-01-17 23:26:07 +03:00
"index e69de29b..79058077 100644",
2016-11-11 00:19:53 +03:00
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
2016-12-02 00:03:52 +03:00
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "42a2152c0a23d01ee22d8c62993ec897bf53868e..5dea1dda0190bccb83434de2d8b4860771cbfb17"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-unary-expressions-insert-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
4,
2017-01-17 23:26:07 +03:00
1
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
5
]
}
},
"summary": "Added the '!<-a' operator in the main function"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
5,
2017-01-17 23:26:07 +03:00
1
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 17:50:05 +03:00
7
]
}
},
"summary": "Added the '*foo()' operator in the main function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
2017-01-17 23:26:07 +03:00
"index 79058077..bdf9ccc5 100644",
2016-11-11 00:19:53 +03:00
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +1,6 @@",
" package main",
" ",
" func main() {",
"-",
2016-11-11 00:19:53 +03:00
"+!<-a",
"+*foo()",
2016-12-02 00:03:52 +03:00
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "5dea1dda0190bccb83434de2d8b4860771cbfb17..4dc2b25ed89f5058545dfa6d8295c9154f09fa0f"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-unary-expressions-replacement-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
4
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
5
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
4
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
5
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'b' identifier in the main function"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 17:50:05 +03:00
2
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 17:50:05 +03:00
5
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 17:50:05 +03:00
2
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 17:50:05 +03:00
5
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the bar() function call of the 'main' function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
2017-01-17 23:26:07 +03:00
"index bdf9ccc5..cf8ed882 100644",
2016-11-11 00:19:53 +03:00
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
2016-12-02 00:03:52 +03:00
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-!<-a",
"-*foo()",
"+!<-b",
"+*bar()",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "4dc2b25ed89f5058545dfa6d8295c9154f09fa0f..bf89e2c33d6bbee034099bfee6ecbf0f4c963e0a"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-unary-expressions-delete-replacement-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
4
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
5
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
4
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
5
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'a' identifier in the main function"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 17:50:05 +03:00
2
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 17:50:05 +03:00
5
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 17:50:05 +03:00
2
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 17:50:05 +03:00
5
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the foo() function call of the 'main' function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
2017-01-17 23:26:07 +03:00
"index cf8ed882..bdf9ccc5 100644",
2016-11-11 00:19:53 +03:00
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
2016-12-02 00:03:52 +03:00
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
"-!<-b",
"-*bar()",
2016-12-02 00:03:52 +03:00
"+!<-a",
"+*foo()",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "bf89e2c33d6bbee034099bfee6ecbf0f4c963e0a..9fb2bd701e16309712a07c2c4780affe1eb3a90e"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-unary-expressions-delete-insert-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"delete": {
"start": [
2016-12-02 00:03:52 +03:00
4,
2017-01-17 23:26:07 +03:00
1
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 17:50:05 +03:00
5
]
}
},
"summary": "Deleted the '!<-a' operator in the main function"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"delete": {
"start": [
2016-12-02 00:03:52 +03:00
5,
2017-01-17 23:26:07 +03:00
1
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 17:50:05 +03:00
7
]
}
},
"summary": "Deleted the '*foo()' operator in the main function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
2017-01-17 23:26:07 +03:00
"index bdf9ccc5..79058077 100644",
2016-11-11 00:19:53 +03:00
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
2016-12-02 00:03:52 +03:00
"@@ -1,6 +1,5 @@",
" package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
"-!<-a",
"-*foo()",
2016-12-02 00:03:52 +03:00
"+",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "9fb2bd701e16309712a07c2c4780affe1eb3a90e..229450790e49297352d07d34076506f8dc21d5e3"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-unary-expressions-teardown-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
2016-11-11 00:19:53 +03:00
"delete": {
"start": [
1,
1
],
"end": [
1,
13
2016-11-11 00:19:53 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'main' module"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'main' function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
2017-01-17 23:26:07 +03:00
"index 79058077..e69de29b 100644",
2016-11-11 00:19:53 +03:00
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "229450790e49297352d07d34076506f8dc21d5e3..cc715d4522917ba50c5e150c016f9175de100183"
2016-11-02 17:50:05 +03:00
}]