1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/go/int-literals.json

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 the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
2,
5
],
"end": [
2,
6
]
}
},
"summary": "Added '1'"
},
{
"span": {
"insert": {
"start": [
2,
8
],
"end": [
2,
9
]
}
},
"summary": "Added the 'b' identifier"
},
{
"span": {
"insert": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Added '2'"
},
{
"span": {
"insert": {
"start": [
2,
15
],
"end": [
2,
16
]
}
},
"summary": "Added the '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": "f506441da93c9b84b48df54338a1c9a9314a3f6b..9d5ff0437bec316dc6fb0b635399fc0eeb773fd1"
}
,{
"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 '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 the '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": "9d5ff0437bec316dc6fb0b635399fc0eeb773fd1..e8c883af60295fc66c20e1b28e145c9004c4cc8c"
}
,{
"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": "e8c883af60295fc66c20e1b28e145c9004c4cc8c..3772ecf68cb0d358dbdeb9461a4f6af3f3262819"
}
,{
"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": "3772ecf68cb0d358dbdeb9461a4f6af3f3262819..990a480122b9d1d215e11f57438e2d71b26327f9"
}
,{
"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": "990a480122b9d1d215e11f57438e2d71b26327f9..ba3be016a8741ede842a3f0a22ab888a13245afa"
}
,{
"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 '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 the '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": "ba3be016a8741ede842a3f0a22ab888a13245afa..b9766bf0963750d39e8d8979650adf6588d1a273"
}
,{
"testCaseDescription": "go-int-literals-delete-rest-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
2,
5
],
"end": [
2,
6
]
}
},
"summary": "Deleted '4'"
},
{
"span": {
"delete": {
"start": [
2,
8
],
"end": [
2,
9
]
}
},
"summary": "Deleted the 'b' identifier"
},
{
"span": {
"delete": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Deleted '5'"
},
{
"span": {
"delete": {
"start": [
2,
15
],
"end": [
2,
16
]
}
},
"summary": "Deleted the '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": "b9766bf0963750d39e8d8979650adf6588d1a273..8169b76dce111ce0792b3533976dadc693b590b7"
}]