1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00
semantic/test/corpus/diff-summaries/ruby/math-assignment.json

745 lines
22 KiB
JSON
Raw Normal View History

2016-10-24 20:43:31 +03:00
[{
2016-10-31 23:21:58 +03:00
"testCaseDescription": "ruby-math-assignment-insert-test",
2016-10-24 20:43:31 +03:00
"expectedResult": {
"changes": {
2016-10-31 23:21:58 +03:00
"math-assignment.rb": [
2016-10-24 20:43:31 +03:00
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
7
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Added the 'x' math assignment"
},
2016-10-24 20:43:31 +03:00
{
"span": {
"insert": {
"start": [
5,
1
2016-10-24 20:43:31 +03:00
],
"end": [
5,
8
]
}
},
"summary": "Added the 'x' math assignment"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
2016-10-24 20:43:31 +03:00
},
"filePaths": [
2016-10-31 23:21:58 +03:00
"math-assignment.rb"
2016-10-24 20:43:31 +03:00
],
"patch": [
"diff --git a/math-assignment.rb b/math-assignment.rb",
"index e69de29..9c3bd32 100644",
"--- a/math-assignment.rb",
"+++ b/math-assignment.rb",
"@@ -0,0 +1,5 @@",
"+x += 1",
"+x -= 1",
"+x *= 1",
"+x /= 1",
"+x **= 1"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "b8a1e5f549bc1fa5a1424093d499d32fa0987cee..5438892990d5ecfa57ee99c577aa175b73ffbabe"
2016-10-24 20:43:31 +03:00
}
,{
2016-10-31 23:21:58 +03:00
"testCaseDescription": "ruby-math-assignment-replacement-insert-test",
2016-10-24 20:43:31 +03:00
"expectedResult": {
"changes": {
2016-10-31 23:21:58 +03:00
"math-assignment.rb": [
2016-10-24 20:43:31 +03:00
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
2016-10-24 20:43:31 +03:00
},
"summary": "Added the 'x' math assignment"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
"start": [
2,
2016-10-24 20:43:31 +03:00
1
],
"end": [
2,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Added the 'x' math assignment"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
"start": [
3,
1
2016-10-24 20:43:31 +03:00
],
"end": [
3,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Added the 'x' math assignment"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
2016-10-24 20:43:31 +03:00
"start": [
4,
1
],
"end": [
4,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Added the 'x' math assignment"
},
2016-10-24 20:43:31 +03:00
{
"span": {
"insert": {
"start": [
5,
1
2016-10-24 20:43:31 +03:00
],
"end": [
5,
8
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
6,
2016-10-24 20:43:31 +03:00
1
],
"end": [
6,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Added the 'x' math assignment"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
2016-10-24 20:43:31 +03:00
"start": [
7,
1
2016-10-24 20:43:31 +03:00
],
"end": [
7,
7
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
8,
1
],
"end": [
8,
7
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
9,
1
],
"end": [
9,
7
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
10,
1
],
"end": [
10,
2016-10-24 20:43:31 +03:00
8
]
}
},
"summary": "Added the 'x' math assignment"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
2016-10-24 20:43:31 +03:00
},
"filePaths": [
2016-10-31 23:21:58 +03:00
"math-assignment.rb"
2016-10-24 20:43:31 +03:00
],
"patch": [
"diff --git a/math-assignment.rb b/math-assignment.rb",
"index 9c3bd32..ebf1cd7 100644",
"--- a/math-assignment.rb",
"+++ b/math-assignment.rb",
"@@ -1,3 +1,13 @@",
"+x+= 2",
"+x -= 1",
"+x *= 1",
"+x /= 1",
"+x **= 1",
"+x += 1",
"+x -= 1",
"+x *= 1",
"+x /= 1",
"+x **= 1",
" x += 1",
" x -= 1",
" x *= 1"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "5438892990d5ecfa57ee99c577aa175b73ffbabe..f70cdf5d64b650094018ccee6d9b42009ad22fde"
2016-10-24 20:43:31 +03:00
}
,{
2016-10-31 23:21:58 +03:00
"testCaseDescription": "ruby-math-assignment-delete-insert-test",
2016-10-24 20:43:31 +03:00
"expectedResult": {
"changes": {
2016-10-31 23:21:58 +03:00
"math-assignment.rb": [
2016-10-24 20:43:31 +03:00
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
6
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced '2' with '1' in the x math assignment"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-10-31 23:21:58 +03:00
"math-assignment.rb"
2016-10-24 20:43:31 +03:00
],
"patch": [
"diff --git a/math-assignment.rb b/math-assignment.rb",
"index ebf1cd7..8751768 100644",
"--- a/math-assignment.rb",
"+++ b/math-assignment.rb",
"@@ -1,4 +1,4 @@",
"-x+= 2",
"+x += 1",
" x -= 1",
" x *= 1",
" x /= 1"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "f70cdf5d64b650094018ccee6d9b42009ad22fde..e9c35072aff21a20a3e388f9cf3c172194218160"
2016-10-24 20:43:31 +03:00
}
,{
2016-10-31 23:21:58 +03:00
"testCaseDescription": "ruby-math-assignment-replacement-test",
2016-10-24 20:43:31 +03:00
"expectedResult": {
"changes": {
2016-10-31 23:21:58 +03:00
"math-assignment.rb": [
2016-10-24 20:43:31 +03:00
{
"span": {
"replace": [
{
"start": [
1,
6
],
"end": [
1,
7
]
},
{
"start": [
1,
5
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced '1' with '2' in the x math assignment"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-10-31 23:21:58 +03:00
"math-assignment.rb"
2016-10-24 20:43:31 +03:00
],
"patch": [
"diff --git a/math-assignment.rb b/math-assignment.rb",
"index 8751768..ebf1cd7 100644",
"--- a/math-assignment.rb",
"+++ b/math-assignment.rb",
"@@ -1,4 +1,4 @@",
"-x += 1",
"+x+= 2",
" x -= 1",
" x *= 1",
" x /= 1"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "e9c35072aff21a20a3e388f9cf3c172194218160..76a45dcf02f834864ade4b2ed1ec5fd0dd0c7f76"
2016-10-24 20:43:31 +03:00
}
,{
2016-10-31 23:21:58 +03:00
"testCaseDescription": "ruby-math-assignment-delete-replacement-test",
2016-10-24 20:43:31 +03:00
"expectedResult": {
"changes": {
2016-10-31 23:21:58 +03:00
"math-assignment.rb": [
2016-10-24 20:43:31 +03:00
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
2016-10-24 20:43:31 +03:00
},
"summary": "Deleted the 'x' math assignment"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
2016-10-24 20:43:31 +03:00
},
"summary": "Deleted the 'x' math assignment"
},
2016-10-24 20:43:31 +03:00
{
"span": {
"delete": {
2016-10-24 20:43:31 +03:00
"start": [
3,
1
2016-10-24 20:43:31 +03:00
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"delete": {
"start": [
4,
2016-10-24 20:43:31 +03:00
1
],
"end": [
4,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Deleted the 'x' math assignment"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
8
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"delete": {
"start": [
6,
1
2016-10-24 20:43:31 +03:00
],
"end": [
6,
7
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
6,
2016-10-24 20:43:31 +03:00
1
],
"end": [
6,
6
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Added the 'x' math assignment"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
2016-10-24 20:43:31 +03:00
},
"filePaths": [
2016-10-31 23:21:58 +03:00
"math-assignment.rb"
2016-10-24 20:43:31 +03:00
],
"patch": [
"diff --git a/math-assignment.rb b/math-assignment.rb",
"index ebf1cd7..207ee13 100644",
"--- a/math-assignment.rb",
"+++ b/math-assignment.rb",
"@@ -1,14 +1,9 @@",
"-x+= 2",
"-x -= 1",
"-x *= 1",
"-x /= 1",
"-x **= 1",
" x += 1",
" x -= 1",
" x *= 1",
" x /= 1",
" x **= 1",
"-x += 1",
"+x+= 2",
" x -= 1",
" x *= 1",
" x /= 1"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "76a45dcf02f834864ade4b2ed1ec5fd0dd0c7f76..33f478735db5f9a23c2760a55dfc3e4acbdc46f8"
2016-10-24 20:43:31 +03:00
}
,{
2016-10-31 23:21:58 +03:00
"testCaseDescription": "ruby-math-assignment-delete-test",
2016-10-24 20:43:31 +03:00
"expectedResult": {
"changes": {
2016-10-31 23:21:58 +03:00
"math-assignment.rb": [
2016-10-24 20:43:31 +03:00
{
"span": {
"delete": {
2016-10-24 20:43:31 +03:00
"start": [
1,
2016-10-24 20:43:31 +03:00
1
],
"end": [
1,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Deleted the 'x' math assignment"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
2,
2016-10-24 20:43:31 +03:00
1
],
"end": [
2,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Deleted the 'x' math assignment"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
3,
1
2016-10-24 20:43:31 +03:00
],
"end": [
3,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Deleted the 'x' math assignment"
},
2016-10-24 20:43:31 +03:00
{
"span": {
"delete": {
2016-10-24 20:43:31 +03:00
"start": [
4,
1
2016-10-24 20:43:31 +03:00
],
"end": [
4,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Deleted the 'x' math assignment"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
5,
1
2016-10-24 20:43:31 +03:00
],
"end": [
5,
8
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Deleted the 'x' math assignment"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
2016-10-24 20:43:31 +03:00
},
"filePaths": [
2016-10-31 23:21:58 +03:00
"math-assignment.rb"
2016-10-24 20:43:31 +03:00
],
"patch": [
"diff --git a/math-assignment.rb b/math-assignment.rb",
"index 207ee13..fd6ee10 100644",
"--- a/math-assignment.rb",
"+++ b/math-assignment.rb",
"@@ -1,8 +1,3 @@",
"-x += 1",
"-x -= 1",
"-x *= 1",
"-x /= 1",
"-x **= 1",
" x+= 2",
" x -= 1",
" x *= 1"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "33f478735db5f9a23c2760a55dfc3e4acbdc46f8..f81054ebeafb1e11c934903a5f5bc2341f79a500"
2016-10-24 20:43:31 +03:00
}
,{
2016-10-31 23:21:58 +03:00
"testCaseDescription": "ruby-math-assignment-delete-rest-test",
2016-10-24 20:43:31 +03:00
"expectedResult": {
"changes": {
2016-10-31 23:21:58 +03:00
"math-assignment.rb": [
2016-10-24 20:43:31 +03:00
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
7
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Deleted the 'x' math assignment"
},
2016-10-24 20:43:31 +03:00
{
"span": {
"delete": {
"start": [
5,
1
2016-10-24 20:43:31 +03:00
],
"end": [
5,
8
]
}
},
"summary": "Deleted the 'x' math assignment"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
2016-10-24 20:43:31 +03:00
},
"filePaths": [
2016-10-31 23:21:58 +03:00
"math-assignment.rb"
2016-10-24 20:43:31 +03:00
],
"patch": [
"diff --git a/math-assignment.rb b/math-assignment.rb",
"index fd6ee10..e69de29 100644",
"--- a/math-assignment.rb",
"+++ b/math-assignment.rb",
"@@ -1,5 +0,0 @@",
"-x+= 2",
"-x -= 1",
"-x *= 1",
"-x /= 1",
"-x **= 1"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
"shas": "f81054ebeafb1e11c934903a5f5bc2341f79a500..6564c9c8832540d910a4118a6130305613ef9772"
2016-10-24 20:43:31 +03:00
}]