mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
539 lines
16 KiB
JSON
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": "42975c2ba57995b8cc4cfe30c7599c673970dd25..383857c1c2527b50055c4dfe90fb44b26bf0fefa"
|
|
}
|
|
,{
|
|
"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": "383857c1c2527b50055c4dfe90fb44b26bf0fefa..9312cbe74e464febaa3f93fb1b2adf7011d1b95b"
|
|
}
|
|
,{
|
|
"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": "9312cbe74e464febaa3f93fb1b2adf7011d1b95b..57ec8fc14e1e8a6d8634011258174e08068a4198"
|
|
}
|
|
,{
|
|
"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": "57ec8fc14e1e8a6d8634011258174e08068a4198..c8e2c9b5af896f4b2a72cc9862c60df9a1b65aa4"
|
|
}
|
|
,{
|
|
"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": "c8e2c9b5af896f4b2a72cc9862c60df9a1b65aa4..f3aa65ee6692f5aa37c6f8e6a01d2093e27999a0"
|
|
}
|
|
,{
|
|
"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": "f3aa65ee6692f5aa37c6f8e6a01d2093e27999a0..da09442b50bcb67001af1f6599a2d2cd37c86907"
|
|
}
|
|
,{
|
|
"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": "da09442b50bcb67001af1f6599a2d2cd37c86907..b3266e749035509bbbd882ef5e2d3ad93c3c60bf"
|
|
}]
|