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/increment-decrement-statements.json

545 lines
17 KiB
JSON

[{
"testCaseDescription": "go-increment-decrement-statements-insert-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
2
]
}
},
"summary": "Added the 'i' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Added the 'j' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index e69de29..c118f41 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -0,0 +1,2 @@",
"+i++",
"+j--"
],
"gitDir": "test/corpus/repos/go",
"shas": "98203b79bc9b7a73ea75f617fda93367a138ecc1..77be9d56861ed8f71f1b5875327b823fbea5e956"
}
,{
"testCaseDescription": "go-increment-decrement-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Added the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Added the 'x' identifier"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
2
]
}
},
"summary": "Added the 'i' identifier"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'j' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index c118f41..d617bc4 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,2 +1,6 @@",
"+foo++",
"+x++",
"+i++",
"+j--",
" i++",
" j--"
],
"gitDir": "test/corpus/repos/go",
"shas": "77be9d56861ed8f71f1b5875327b823fbea5e956..f08c9feebc7d906d89c50909d7301a365f8b61d7"
}
,{
"testCaseDescription": "go-increment-decrement-statements-delete-insert-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
4
]
},
{
"start": [
1,
1
],
"end": [
1,
2
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'i' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Added the 'j' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'x' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index d617bc4..15214d0 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,5 +1,5 @@",
"-foo++",
"-x++",
"+i++",
"+j--",
" i++",
" j--",
" i++"
],
"gitDir": "test/corpus/repos/go",
"shas": "f08c9feebc7d906d89c50909d7301a365f8b61d7..230625b51e78b737b66fc0a18d221f388b732b2d"
}
,{
"testCaseDescription": "go-increment-decrement-statements-replacement-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
2
]
},
{
"start": [
1,
1
],
"end": [
1,
4
]
}
]
},
"summary": "Replaced the 'i' identifier with the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Added the 'x' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'j' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index 15214d0..d617bc4 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,5 +1,5 @@",
"-i++",
"-j--",
"+foo++",
"+x++",
" i++",
" j--",
" i++"
],
"gitDir": "test/corpus/repos/go",
"shas": "230625b51e78b737b66fc0a18d221f388b732b2d..62ec2857bc9d460ed4da6883c2b8272cb4712af5"
}
,{
"testCaseDescription": "go-increment-decrement-statements-delete-replacement-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Deleted the 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'x' identifier"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
2
]
}
},
"summary": "Deleted the 'i' identifier"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'j' identifier"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
4
]
}
},
"summary": "Added the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'x' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index d617bc4..640bbf1 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,6 +1,4 @@",
"-foo++",
"-x++",
"-i++",
"-j--",
" i++",
" j--",
"+foo++",
"+x++"
],
"gitDir": "test/corpus/repos/go",
"shas": "62ec2857bc9d460ed4da6883c2b8272cb4712af5..b9839e22e0500424e2a4e5f4f75608d32fa287c4"
}
,{
"testCaseDescription": "go-increment-decrement-statements-delete-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
2
]
}
},
"summary": "Deleted the 'i' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'j' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index 640bbf1..b7c351d 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,4 +1,2 @@",
"-i++",
"-j--",
" foo++",
" x++"
],
"gitDir": "test/corpus/repos/go",
"shas": "b9839e22e0500424e2a4e5f4f75608d32fa287c4..fd829acf033dadd3461d26550491e2f81cdd1eb3"
}
,{
"testCaseDescription": "go-increment-decrement-statements-delete-rest-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Deleted the 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'x' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index b7c351d..e69de29 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,2 +0,0 @@",
"-foo++",
"-x++"
],
"gitDir": "test/corpus/repos/go",
"shas": "fd829acf033dadd3461d26550491e2f81cdd1eb3..8d89bea5e46b76ee96f5a7065b6c17c0b9a24f65"
}]