1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/go/go-and-defer-statements.json

647 lines
21 KiB
JSON

[{
"testCaseDescription": "go-go-and-defer-statements-insert-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
12
]
}
},
"summary": "Added the 'x[y]()' defer statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
9
]
}
},
"summary": "Added the 'x[y]()' go statement"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index e69de29..2638f27 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -0,0 +1,2 @@",
"+defer x.y()",
"+go x.y()"
],
"gitDir": "test/corpus/repos/go",
"shas": "869638edeb99d0d8b3272767460e1f2a83cead8d..7b1d7508d87a7e9e124d88d08449a5fc9851ee6c"
}
,{
"testCaseDescription": "go-go-and-defer-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
12
]
}
},
"summary": "Added the 'a[b]()' defer statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
9
]
}
},
"summary": "Added the 'c[d]()' go statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
12
]
}
},
"summary": "Added the 'x[y]()' defer statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
9
]
}
},
"summary": "Added the 'x[y]()' go statement"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index 2638f27..0cb11d5 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,2 +1,6 @@",
"+defer a.b()",
"+go c.d()",
"+defer x.y()",
"+go x.y()",
" defer x.y()",
" go x.y()"
],
"gitDir": "test/corpus/repos/go",
"shas": "7b1d7508d87a7e9e124d88d08449a5fc9851ee6c..65202504265bcc4608d4f0826489c8dfa12d7401"
}
,{
"testCaseDescription": "go-go-and-defer-statements-delete-insert-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
7
],
"end": [
1,
8
]
},
{
"start": [
1,
7
],
"end": [
1,
8
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access"
},
{
"span": {
"replace": [
{
"start": [
1,
9
],
"end": [
1,
10
]
},
{
"start": [
1,
9
],
"end": [
1,
10
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
4
],
"end": [
2,
5
]
},
{
"start": [
2,
4
],
"end": [
2,
5
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'x' identifier in the x[y] subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
6
],
"end": [
2,
7
]
},
{
"start": [
2,
6
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the 'd' identifier with the 'y' identifier in the x[y] subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index 0cb11d5..bdc42aa 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,5 +1,5 @@",
"-defer a.b()",
"-go c.d()",
"+defer x.y()",
"+go x.y()",
" defer x.y()",
" go x.y()",
" defer x.y()"
],
"gitDir": "test/corpus/repos/go",
"shas": "65202504265bcc4608d4f0826489c8dfa12d7401..48f1f1dd4a0649de94363920cc2270d8ee3e8597"
}
,{
"testCaseDescription": "go-go-and-defer-statements-replacement-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
7
],
"end": [
1,
8
]
},
{
"start": [
1,
7
],
"end": [
1,
8
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access"
},
{
"span": {
"replace": [
{
"start": [
1,
9
],
"end": [
1,
10
]
},
{
"start": [
1,
9
],
"end": [
1,
10
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
4
],
"end": [
2,
5
]
},
{
"start": [
2,
4
],
"end": [
2,
5
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'c' identifier in the c[d] subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
6
],
"end": [
2,
7
]
},
{
"start": [
2,
6
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'd' identifier in the c[d] subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index bdc42aa..0cb11d5 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,5 +1,5 @@",
"-defer x.y()",
"-go x.y()",
"+defer a.b()",
"+go c.d()",
" defer x.y()",
" go x.y()",
" defer x.y()"
],
"gitDir": "test/corpus/repos/go",
"shas": "48f1f1dd4a0649de94363920cc2270d8ee3e8597..f32d6ed21a6c4baf397050ca25a7fa6c81de870b"
}
,{
"testCaseDescription": "go-go-and-defer-statements-delete-replacement-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
12
]
}
},
"summary": "Deleted the 'a[b]()' defer statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
9
]
}
},
"summary": "Deleted the 'c[d]()' go statement"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
12
]
}
},
"summary": "Deleted the 'x[y]()' defer statement"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
9
]
}
},
"summary": "Deleted the 'x[y]()' go statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
12
]
}
},
"summary": "Added the 'a[b]()' defer statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
9
]
}
},
"summary": "Added the 'c[d]()' go statement"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index 0cb11d5..f18666e 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,6 +1,4 @@",
"-defer a.b()",
"-go c.d()",
"-defer x.y()",
"-go x.y()",
" defer x.y()",
" go x.y()",
"+defer a.b()",
"+go c.d()"
],
"gitDir": "test/corpus/repos/go",
"shas": "f32d6ed21a6c4baf397050ca25a7fa6c81de870b..00d614f9ca3158bce4250ae75754d42d50ac71c1"
}
,{
"testCaseDescription": "go-go-and-defer-statements-delete-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
12
]
}
},
"summary": "Deleted the 'x[y]()' defer statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
9
]
}
},
"summary": "Deleted the 'x[y]()' go statement"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index f18666e..eefd2e4 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,4 +1,2 @@",
"-defer x.y()",
"-go x.y()",
" defer a.b()",
" go c.d()"
],
"gitDir": "test/corpus/repos/go",
"shas": "00d614f9ca3158bce4250ae75754d42d50ac71c1..2aef71f995089e1a380b7892be8160657f11bcf7"
}
,{
"testCaseDescription": "go-go-and-defer-statements-delete-rest-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
12
]
}
},
"summary": "Deleted the 'a[b]()' defer statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
9
]
}
},
"summary": "Deleted the 'c[d]()' go statement"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index eefd2e4..e69de29 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,2 +0,0 @@",
"-defer a.b()",
"-go c.d()"
],
"gitDir": "test/corpus/repos/go",
"shas": "2aef71f995089e1a380b7892be8160657f11bcf7..c4e6795cad01ceb96441009c3d1712d64702bdad"
}]