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/int-literals.json
2016-11-22 13:51:11 -05:00

1089 lines
34 KiB
JSON

[{
"testCaseDescription": "go-int-literals-insert-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Added 'a' identifier"
},
{
"span": {
"insert": {
"start": [
2,
5
],
"end": [
2,
6
]
}
},
"summary": "Added '1'"
},
{
"span": {
"insert": {
"start": [
2,
8
],
"end": [
2,
9
]
}
},
"summary": "Added 'b' identifier"
},
{
"span": {
"insert": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Added '2'"
},
{
"span": {
"insert": {
"start": [
2,
15
],
"end": [
2,
16
]
}
},
"summary": "Added 'c' identifier"
},
{
"span": {
"insert": {
"start": [
2,
19
],
"end": [
2,
20
]
}
},
"summary": "Added '3'"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index e69de29..11caaee 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -0,0 +1,3 @@",
"+const (",
"+a = 1, b = 2, c = 3",
"+)"
],
"gitDir": "test/corpus/repos/go",
"shas": "424844dbc2297652ccb81023c78ee64bd948b232..25d7a8ddbfa6c3508db860cb3851ed0715ad97c9"
}
,{
"testCaseDescription": "go-int-literals-replacement-insert-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
6
]
},
{
"start": [
2,
5
],
"end": [
2,
6
]
}
]
},
"summary": "Replaced '1' with '4'"
},
{
"span": {
"insert": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Added '5'"
},
{
"span": {
"delete": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Deleted '2'"
},
{
"span": {
"replace": [
{
"start": [
2,
19
],
"end": [
2,
20
]
},
{
"start": [
2,
19
],
"end": [
2,
20
]
}
]
},
"summary": "Replaced '3' with '6'"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
5,
5
],
"end": [
5,
6
]
}
},
"summary": "Added the '1'"
},
{
"span": {
"insert": {
"start": [
5,
8
],
"end": [
5,
9
]
}
},
"summary": "Added the 'b' identifier"
},
{
"span": {
"insert": {
"start": [
5,
12
],
"end": [
5,
13
]
}
},
"summary": "Added '2'"
},
{
"span": {
"insert": {
"start": [
5,
15
],
"end": [
5,
16
]
}
},
"summary": "Added 'c' identifier"
},
{
"span": {
"insert": {
"start": [
5,
19
],
"end": [
5,
20
]
}
},
"summary": "Added '3'"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
9,
2
]
}
},
"summary": "Added the 'a' variable"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index 11caaee..c8fc4e8 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -1,3 +1,9 @@",
" const (",
"+a = 4, b = 5, c = 6",
"+)",
"+const (",
"+a = 1, b = 2, c = 3",
"+)",
"+const (",
" a = 1, b = 2, c = 3",
" )"
],
"gitDir": "test/corpus/repos/go",
"shas": "25d7a8ddbfa6c3508db860cb3851ed0715ad97c9..7677db90a09db2bd82464ed712610cb73feff927"
}
,{
"testCaseDescription": "go-int-literals-delete-insert-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
6
]
},
{
"start": [
2,
5
],
"end": [
2,
6
]
}
]
},
"summary": "Replaced '4' with '1'"
},
{
"span": {
"insert": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Added '2'"
},
{
"span": {
"delete": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Deleted '5'"
},
{
"span": {
"replace": [
{
"start": [
2,
19
],
"end": [
2,
20
]
},
{
"start": [
2,
19
],
"end": [
2,
20
]
}
]
},
"summary": "Replaced '6' with '3'"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index c8fc4e8..5e0181f 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -1,5 +1,5 @@",
" const (",
"-a = 4, b = 5, c = 6",
"+a = 1, b = 2, c = 3",
" )",
" const (",
" a = 1, b = 2, c = 3"
],
"gitDir": "test/corpus/repos/go",
"shas": "7677db90a09db2bd82464ed712610cb73feff927..522ab37f077af79fb00f156daab9c4307536494e"
}
,{
"testCaseDescription": "go-int-literals-replacement-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
6
]
},
{
"start": [
2,
5
],
"end": [
2,
6
]
}
]
},
"summary": "Replaced '1' with '4'"
},
{
"span": {
"insert": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Added '5'"
},
{
"span": {
"delete": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Deleted '2'"
},
{
"span": {
"replace": [
{
"start": [
2,
19
],
"end": [
2,
20
]
},
{
"start": [
2,
19
],
"end": [
2,
20
]
}
]
},
"summary": "Replaced '3' with '6'"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index 5e0181f..c8fc4e8 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -1,5 +1,5 @@",
" const (",
"-a = 1, b = 2, c = 3",
"+a = 4, b = 5, c = 6",
" )",
" const (",
" a = 1, b = 2, c = 3"
],
"gitDir": "test/corpus/repos/go",
"shas": "522ab37f077af79fb00f156daab9c4307536494e..7c3c89dff0fe4b2429a03988c91da14de39e1b67"
}
,{
"testCaseDescription": "go-int-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
6
]
},
{
"start": [
2,
5
],
"end": [
2,
6
]
}
]
},
"summary": "Replaced '4' with '1'"
},
{
"span": {
"insert": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Added '2'"
},
{
"span": {
"delete": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Deleted '5'"
},
{
"span": {
"replace": [
{
"start": [
2,
19
],
"end": [
2,
20
]
},
{
"start": [
2,
19
],
"end": [
2,
20
]
}
]
},
"summary": "Replaced '6' with '3'"
},
{
"span": {
"replace": [
{
"start": [
5,
5
],
"end": [
5,
6
]
},
{
"start": [
5,
5
],
"end": [
5,
6
]
}
]
},
"summary": "Replaced '1' with '4'"
},
{
"span": {
"replace": [
{
"start": [
5,
12
],
"end": [
5,
13
]
},
{
"start": [
5,
12
],
"end": [
5,
13
]
}
]
},
"summary": "Replaced '2' with '5'"
},
{
"span": {
"replace": [
{
"start": [
5,
19
],
"end": [
5,
20
]
},
{
"start": [
5,
19
],
"end": [
5,
20
]
}
]
},
"summary": "Replaced '3' with '6'"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
9,
2
]
}
},
"summary": "Deleted the 'a' variable"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index c8fc4e8..44afd3b 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -1,9 +1,6 @@",
" const (",
"-a = 4, b = 5, c = 6",
"-)",
"-const (",
" a = 1, b = 2, c = 3",
" )",
" const (",
"-a = 1, b = 2, c = 3",
"+a = 4, b = 5, c = 6",
" )"
],
"gitDir": "test/corpus/repos/go",
"shas": "7c3c89dff0fe4b2429a03988c91da14de39e1b67..9e0c52c671d2927449fde5d7e2de0c26a5847c44"
}
,{
"testCaseDescription": "go-int-literals-delete-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
6
]
},
{
"start": [
2,
5
],
"end": [
2,
6
]
}
]
},
"summary": "Replaced '1' with '4'"
},
{
"span": {
"insert": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Added '5'"
},
{
"span": {
"delete": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Deleted '2'"
},
{
"span": {
"replace": [
{
"start": [
2,
19
],
"end": [
2,
20
]
},
{
"start": [
2,
19
],
"end": [
2,
20
]
}
]
},
"summary": "Replaced '3' with '6'"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
5,
5
],
"end": [
5,
6
]
}
},
"summary": "Deleted the '4'"
},
{
"span": {
"delete": {
"start": [
5,
8
],
"end": [
5,
9
]
}
},
"summary": "Deleted the 'b' identifier"
},
{
"span": {
"delete": {
"start": [
5,
12
],
"end": [
5,
13
]
}
},
"summary": "Deleted '5'"
},
{
"span": {
"delete": {
"start": [
5,
15
],
"end": [
5,
16
]
}
},
"summary": "Deleted 'c' identifier"
},
{
"span": {
"delete": {
"start": [
5,
19
],
"end": [
5,
20
]
}
},
"summary": "Deleted '6'"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index 44afd3b..0e70b15 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -1,6 +1,3 @@",
" const (",
"-a = 1, b = 2, c = 3",
"-)",
"-const (",
" a = 4, b = 5, c = 6",
" )"
],
"gitDir": "test/corpus/repos/go",
"shas": "9e0c52c671d2927449fde5d7e2de0c26a5847c44..f75467335c9d696a1e8b606705cbe985ff6abbbd"
}
,{
"testCaseDescription": "go-int-literals-delete-rest-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted 'a' identifier"
},
{
"span": {
"delete": {
"start": [
2,
5
],
"end": [
2,
6
]
}
},
"summary": "Deleted '4'"
},
{
"span": {
"delete": {
"start": [
2,
8
],
"end": [
2,
9
]
}
},
"summary": "Deleted 'b' identifier"
},
{
"span": {
"delete": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Deleted '5'"
},
{
"span": {
"delete": {
"start": [
2,
15
],
"end": [
2,
16
]
}
},
"summary": "Deleted 'c' identifier"
},
{
"span": {
"delete": {
"start": [
2,
19
],
"end": [
2,
20
]
}
},
"summary": "Deleted '6'"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index 0e70b15..e69de29 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -1,3 +0,0 @@",
"-const (",
"-a = 4, b = 5, c = 6",
"-)"
],
"gitDir": "test/corpus/repos/go",
"shas": "f75467335c9d696a1e8b606705cbe985ff6abbbd..71ec663fd0b06d2d177f46ca78549d6eca44f490"
}]