mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
522 lines
16 KiB
JSON
522 lines
16 KiB
JSON
[{
|
|
"testCaseDescription": "go-send-statements-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'foo' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '5'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index e69de29..9df974c 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -0,0 +1 @@",
|
|
"+foo <- 5"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "7fd6dea031e26a02c1743a205dc1489a7e050468..0c3bf2eda05dc415465ee2ed1bfe6ac87a0d41bd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'bar' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '6'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'foo' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
8
|
|
],
|
|
"end": [
|
|
2,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '5'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 9df974c..de76cee 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1 +1,3 @@",
|
|
"+bar <- 6",
|
|
"+foo <- 5",
|
|
" foo <- 5"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "0c3bf2eda05dc415465ee2ed1bfe6ac87a0d41bd..abab5451f999eab126c0ad6f1312d732537d1685"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'bar' identifier with the 'foo' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '6' with '5'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index de76cee..d487575 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-bar <- 6",
|
|
"+foo <- 5",
|
|
" foo <- 5",
|
|
" foo <- 5"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "abab5451f999eab126c0ad6f1312d732537d1685..b88435c07e6bcc26a890ef52e2cc3a63b4ad2155"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo' identifier with the 'bar' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '5' with '6'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index d487575..de76cee 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-foo <- 5",
|
|
"+bar <- 6",
|
|
" foo <- 5",
|
|
" foo <- 5"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "b88435c07e6bcc26a890ef52e2cc3a63b4ad2155..956a353953bd55204b2eb37fdc8727198208edc8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'bar' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '6'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'foo' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
8
|
|
],
|
|
"end": [
|
|
2,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '5'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'bar' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
8
|
|
],
|
|
"end": [
|
|
2,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '6'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index de76cee..65a1c23 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-bar <- 6",
|
|
"-foo <- 5",
|
|
" foo <- 5",
|
|
"+bar <- 6"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "956a353953bd55204b2eb37fdc8727198208edc8..6640556f9db698688695109406ffbdb65d89e298"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'foo' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '5'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index 65a1c23..bab29cb 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1,2 +1 @@",
|
|
"-foo <- 5",
|
|
" bar <- 6"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "6640556f9db698688695109406ffbdb65d89e298..bd1886ba3d3f3e1fde4b18c020b346d71883ee9e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-send-statements-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"send-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'bar' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '6'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"send-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/send-statements.go b/send-statements.go",
|
|
"index bab29cb..e69de29 100644",
|
|
"--- a/send-statements.go",
|
|
"+++ b/send-statements.go",
|
|
"@@ -1 +0,0 @@",
|
|
"-bar <- 6"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "bd1886ba3d3f3e1fde4b18c020b346d71883ee9e..927f995f9a27002e1694b5d3ce66a7dbbfda6720"
|
|
}]
|