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/unary-expressions.json
2016-11-22 13:34:21 -05:00

539 lines
16 KiB
JSON

[{
"testCaseDescription": "go-unary-expressions-insert-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
4
],
"end": [
1,
5
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'identifier()' function call"
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index e69de29..858c09a 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -0,0 +1,2 @@",
"+!<-a",
"+*foo()"
],
"gitDir": "test/corpus/repos/go",
"shas": "37199b35694043d8a6d218a5c20b4949726e23b1..5b2717298dbc215f912f6d1fdeef592af9eb381d"
}
,{
"testCaseDescription": "go-unary-expressions-replacement-insert-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
4
],
"end": [
1,
5
]
}
},
"summary": "Added the 'b' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'identifier()' function call"
},
{
"span": {
"insert": {
"start": [
3,
4
],
"end": [
3,
5
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Added the 'identifier()' function call"
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 858c09a..0b42f98 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,2 +1,6 @@",
"+!<-b",
"+*bar()",
"+!<-a",
"+*foo()",
" !<-a",
" *foo()"
],
"gitDir": "test/corpus/repos/go",
"shas": "5b2717298dbc215f912f6d1fdeef592af9eb381d..0efa86c2b390cfefbebfbaf67f4148598e25f641"
}
,{
"testCaseDescription": "go-unary-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"replace": [
{
"start": [
1,
4
],
"end": [
1,
5
]
},
{
"start": [
1,
4
],
"end": [
1,
5
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'a' identifier"
},
{
"span": {
"replace": [
{
"start": [
2,
2
],
"end": [
2,
5
]
},
{
"start": [
2,
2
],
"end": [
2,
5
]
}
]
},
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the identifier() function call"
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 0b42f98..25afb46 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,5 +1,5 @@",
"-!<-b",
"-*bar()",
"+!<-a",
"+*foo()",
" !<-a",
" *foo()",
" !<-a"
],
"gitDir": "test/corpus/repos/go",
"shas": "0efa86c2b390cfefbebfbaf67f4148598e25f641..6930f300d189146408f7ecd538b75900cd3e06d4"
}
,{
"testCaseDescription": "go-unary-expressions-replacement-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"replace": [
{
"start": [
1,
4
],
"end": [
1,
5
]
},
{
"start": [
1,
4
],
"end": [
1,
5
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'b' identifier"
},
{
"span": {
"replace": [
{
"start": [
2,
2
],
"end": [
2,
5
]
},
{
"start": [
2,
2
],
"end": [
2,
5
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the identifier() function call"
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 25afb46..0b42f98 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,5 +1,5 @@",
"-!<-a",
"-*foo()",
"+!<-b",
"+*bar()",
" !<-a",
" *foo()",
" !<-a"
],
"gitDir": "test/corpus/repos/go",
"shas": "6930f300d189146408f7ecd538b75900cd3e06d4..d4eb3aff3d29f577ffd60b6d824249e09ca6da81"
}
,{
"testCaseDescription": "go-unary-expressions-delete-replacement-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
4
],
"end": [
1,
5
]
}
},
"summary": "Deleted the 'b' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'identifier()' function call"
},
{
"span": {
"delete": {
"start": [
3,
4
],
"end": [
3,
5
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Deleted the 'identifier()' function call"
},
{
"span": {
"insert": {
"start": [
3,
4
],
"end": [
3,
5
]
}
},
"summary": "Added the 'b' identifier"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Added the 'identifier()' function call"
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 0b42f98..812fb68 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,6 +1,4 @@",
"-!<-b",
"-*bar()",
"-!<-a",
"-*foo()",
" !<-a",
" *foo()",
"+!<-b",
"+*bar()"
],
"gitDir": "test/corpus/repos/go",
"shas": "d4eb3aff3d29f577ffd60b6d824249e09ca6da81..f7ba7d5d56e89e3d17e36ce2b5fa75b972062334"
}
,{
"testCaseDescription": "go-unary-expressions-delete-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
4
],
"end": [
1,
5
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'identifier()' function call"
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 812fb68..6da661d 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,4 +1,2 @@",
"-!<-a",
"-*foo()",
" !<-b",
" *bar()"
],
"gitDir": "test/corpus/repos/go",
"shas": "f7ba7d5d56e89e3d17e36ce2b5fa75b972062334..6086c88cc5c5c3523ad1b245cc7f690d417a2902"
}
,{
"testCaseDescription": "go-unary-expressions-delete-rest-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
4
],
"end": [
1,
5
]
}
},
"summary": "Deleted the 'b' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'identifier()' function call"
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 6da661d..e69de29 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,2 +0,0 @@",
"-!<-b",
"-*bar()"
],
"gitDir": "test/corpus/repos/go",
"shas": "6086c88cc5c5c3523ad1b245cc7f690d417a2902..b617246ac108a2a7181f732e47e72e355140ca03"
}]