mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
545 lines
17 KiB
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": "4a8f7f8e71c4c2dcd1213cd3a634d73b2aa8e9b1..d3bfc294c4ceea5a3d9a41c1d62649c15e8472c4"
|
|
}
|
|
,{
|
|
"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": "d3bfc294c4ceea5a3d9a41c1d62649c15e8472c4..b5f5e8bffebe176511e0f7cebd46a1c60049ef9b"
|
|
}
|
|
,{
|
|
"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": "b5f5e8bffebe176511e0f7cebd46a1c60049ef9b..f98e8ef5481ca56391106fd879839a6d3255b629"
|
|
}
|
|
,{
|
|
"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": "f98e8ef5481ca56391106fd879839a6d3255b629..efc4d6cad2a8d83a72a8f327d4494b45eb4badce"
|
|
}
|
|
,{
|
|
"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": "efc4d6cad2a8d83a72a8f327d4494b45eb4badce..c0b31b1d307024e0e77e2e8bdc99c95c1cb81f11"
|
|
}
|
|
,{
|
|
"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": "c0b31b1d307024e0e77e2e8bdc99c95c1cb81f11..799aef1496ac3e86bb2a6b45ab08a69cc72bdb0e"
|
|
}
|
|
,{
|
|
"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": "799aef1496ac3e86bb2a6b45ab08a69cc72bdb0e..7d82d2e9a3d26b19b06458008e620b67792357b1"
|
|
}]
|