mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
1701 lines
52 KiB
JSON
1701 lines
52 KiB
JSON
[{
|
|
"testCaseDescription": "go-assignment-statements-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
4
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
9
|
|
],
|
|
"end": [
|
|
2,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '2'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
12
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'd' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'e' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index e69de29..91be59d 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -0,0 +1,4 @@",
|
|
"+a = 1",
|
|
"+b, c += 2, 3",
|
|
"+d *= 3",
|
|
"+e += 1"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "094c2f7d65ba7d9e4b257986bba0af091ebbfc13..c900c8779e7917267e65a64dea01403e778f74e7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
4
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
9
|
|
],
|
|
"end": [
|
|
2,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '2'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
12
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'z' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'h' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
4
|
|
],
|
|
"end": [
|
|
6,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
9
|
|
],
|
|
"end": [
|
|
6,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '2'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
12
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'd' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
6
|
|
],
|
|
"end": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'e' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
6
|
|
],
|
|
"end": [
|
|
8,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index 91be59d..9d7456f 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,3 +1,11 @@",
|
|
"+x = 1",
|
|
"+y, c += 2, 3",
|
|
"+z *= 3",
|
|
"+h += 1",
|
|
"+a = 1",
|
|
"+b, c += 2, 3",
|
|
"+d *= 3",
|
|
"+e += 1",
|
|
" a = 1",
|
|
" b, c += 2, 3",
|
|
" d *= 3"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "c900c8779e7917267e65a64dea01403e778f74e7..3262317239f9d0b9ff1d9cb8533d2465eef08c12"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'y' identifier with the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'z' identifier with the 'd' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'e' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'h' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index 9d7456f..87b0c42 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,7 +1,7 @@",
|
|
"-x = 1",
|
|
"-y, c += 2, 3",
|
|
"-z *= 3",
|
|
"-h += 1",
|
|
"+a = 1",
|
|
"+b, c += 2, 3",
|
|
"+d *= 3",
|
|
"+e += 1",
|
|
" a = 1",
|
|
" b, c += 2, 3",
|
|
" d *= 3"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "3262317239f9d0b9ff1d9cb8533d2465eef08c12..1adbfcbb310cf93b97033a94c87074e37dc8497d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'd' identifier with the 'z' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'h' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'e' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index 87b0c42..9d7456f 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,7 +1,7 @@",
|
|
"-a = 1",
|
|
"-b, c += 2, 3",
|
|
"-d *= 3",
|
|
"-e += 1",
|
|
"+x = 1",
|
|
"+y, c += 2, 3",
|
|
"+z *= 3",
|
|
"+h += 1",
|
|
" a = 1",
|
|
" b, c += 2, 3",
|
|
" d *= 3"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "1adbfcbb310cf93b97033a94c87074e37dc8497d..0002422af8e5ef0ee3672aee5d97121af4726fcb"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
4
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
9
|
|
],
|
|
"end": [
|
|
2,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '2'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
12
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'z' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'h' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
4
|
|
],
|
|
"end": [
|
|
6,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
9
|
|
],
|
|
"end": [
|
|
6,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '2'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
12
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'd' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
6
|
|
],
|
|
"end": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'e' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
6
|
|
],
|
|
"end": [
|
|
8,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
4
|
|
],
|
|
"end": [
|
|
6,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
9
|
|
],
|
|
"end": [
|
|
6,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '2'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
12
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'z' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
6
|
|
],
|
|
"end": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'h' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
6
|
|
],
|
|
"end": [
|
|
8,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '1'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index 9d7456f..d51ed96 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,12 +1,8 @@",
|
|
"-x = 1",
|
|
"-y, c += 2, 3",
|
|
"-z *= 3",
|
|
"-h += 1",
|
|
"-a = 1",
|
|
"-b, c += 2, 3",
|
|
"-d *= 3",
|
|
"-e += 1",
|
|
" a = 1",
|
|
" b, c += 2, 3",
|
|
" d *= 3",
|
|
" e += 1",
|
|
"+x = 1",
|
|
"+y, c += 2, 3",
|
|
"+z *= 3",
|
|
"+h += 1"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "0002422af8e5ef0ee3672aee5d97121af4726fcb..f05984b49e18500c93f2512a7b62874e60b1cff8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
4
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
9
|
|
],
|
|
"end": [
|
|
2,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '2'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
12
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'd' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'e' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index d51ed96..5f3e29f 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,7 +1,3 @@",
|
|
"-a = 1",
|
|
"-b, c += 2, 3",
|
|
"-d *= 3",
|
|
"-e += 1",
|
|
" x = 1",
|
|
" y, c += 2, 3",
|
|
" z *= 3"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "f05984b49e18500c93f2512a7b62874e60b1cff8..3e390f769bd1c6caa4ecedd091f9f0fe49f791db"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
4
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
9
|
|
],
|
|
"end": [
|
|
2,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '2'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
12
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'z' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '3'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'h' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '1'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index 5f3e29f..e69de29 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,4 +0,0 @@",
|
|
"-x = 1",
|
|
"-y, c += 2, 3",
|
|
"-z *= 3",
|
|
"-h += 1"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "3e390f769bd1c6caa4ecedd091f9f0fe49f791db..cbeb57bcb42e6533c466bee642ff78cdbf0053af"
|
|
}]
|