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": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index e69de29..7905807 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "7553b0a8ce30d85fad48ce7c9c329110f2d32bfa..cdfd4254f5aaeaa559fc1bb6bcabbdc6d3a1257d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'foo' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
8
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '5' in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 7905807..5f327d1 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": "cdfd4254f5aaeaa559fc1bb6bcabbdc6d3a1257d..40debf804678865e30730a226d5956d0b5d0732a"
|
|
}
|
|
,{
|
|
"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 of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
8
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
8
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '5' with '6' in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 5f327d1..3829478 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": "40debf804678865e30730a226d5956d0b5d0732a..7e7ac79ce1d12aa91e75ed752d83f2074bcfcf66"
|
|
}
|
|
,{
|
|
"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 of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
8
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
8
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '6' with '5' in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 3829478..5f327d1 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": "7e7ac79ce1d12aa91e75ed752d83f2074bcfcf66..55ae043dac55f49485f1d2ff298fd7bb8fd38cbb"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'foo' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
8
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '5' in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 5f327d1..7905807 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": "55ae043dac55f49485f1d2ff298fd7bb8fd38cbb..c80fa932dd9f43d434c08186a1d9029c51beb2da"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "c80fa932dd9f43d434c08186a1d9029c51beb2da..2d6c82048942922dde54b64455d2c484b2d56287"
|
|
}]
|