mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
365 lines
11 KiB
JSON
365 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "go-send-statements-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index e69de29b..79058077 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "2284f496c7c7c2e2839ec06094e02898acb65231..fcfe54e630d0a9095bce10ad47fcf9073b13ee20"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo <- 5' send statement in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 79058077..5f327d16 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1,5 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+foo <- 5",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "fcfe54e630d0a9095bce10ad47fcf9073b13ee20..a1df686e39561534c29421cb6314ce739a167972"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
8
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
8
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '5' with '6' in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 5f327d16..3829478b 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1,5 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-foo <- 5",
|
|
"+bar <- 6",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a1df686e39561534c29421cb6314ce739a167972..9f2fd4e6dee9ad1d107fc6e21226d4ba7474cef1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
8
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
8
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '6' with '5' in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 3829478b..5f327d16 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1,5 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-bar <- 6",
|
|
"+foo <- 5",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "9f2fd4e6dee9ad1d107fc6e21226d4ba7474cef1..879b585a691eabfae2e0b3f33f7cc349089155ef"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo <- 5' send statement in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 5f327d16..79058077 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1,5 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-foo <- 5",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "879b585a691eabfae2e0b3f33f7cc349089155ef..b62313f6cd51a1b8d33476713c4a99be103e7f2b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 79058077..e69de29b 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "b62313f6cd51a1b8d33476713c4a99be103e7f2b..b6bb1c45caa8b0af4f8cba2cfd42a2a6e8687f13"
|
|
}]
|