1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/ruby/math-assignment.json
2016-11-03 16:02:56 -07:00

745 lines
22 KiB
JSON

[{
"testCaseDescription": "ruby-math-assignment-insert-test",
"expectedResult": {
"changes": {
"math-assignment.rb": [
{
"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
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
8
]
}
},
"summary": "Added the 'x' math assignment"
}
]
},
"errors": {}
},
"filePaths": [
"math-assignment.rb"
],
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "b8a1e5f549bc1fa5a1424093d499d32fa0987cee..5438892990d5ecfa57ee99c577aa175b73ffbabe"
}
,{
"testCaseDescription": "ruby-math-assignment-replacement-insert-test",
"expectedResult": {
"changes": {
"math-assignment.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"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
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
8
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Added the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"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,
8
]
}
},
"summary": "Added the 'x' math assignment"
}
]
},
"errors": {}
},
"filePaths": [
"math-assignment.rb"
],
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "5438892990d5ecfa57ee99c577aa175b73ffbabe..f70cdf5d64b650094018ccee6d9b42009ad22fde"
}
,{
"testCaseDescription": "ruby-math-assignment-delete-insert-test",
"expectedResult": {
"changes": {
"math-assignment.rb": [
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
6
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced '2' with '1' in the x math assignment"
}
]
},
"errors": {}
},
"filePaths": [
"math-assignment.rb"
],
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "f70cdf5d64b650094018ccee6d9b42009ad22fde..e9c35072aff21a20a3e388f9cf3c172194218160"
}
,{
"testCaseDescription": "ruby-math-assignment-replacement-test",
"expectedResult": {
"changes": {
"math-assignment.rb": [
{
"span": {
"replace": [
{
"start": [
1,
6
],
"end": [
1,
7
]
},
{
"start": [
1,
5
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced '1' with '2' in the x math assignment"
}
]
},
"errors": {}
},
"filePaths": [
"math-assignment.rb"
],
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "e9c35072aff21a20a3e388f9cf3c172194218160..76a45dcf02f834864ade4b2ed1ec5fd0dd0c7f76"
}
,{
"testCaseDescription": "ruby-math-assignment-delete-replacement-test",
"expectedResult": {
"changes": {
"math-assignment.rb": [
{
"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
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
8
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
6
]
}
},
"summary": "Added the 'x' math assignment"
}
]
},
"errors": {}
},
"filePaths": [
"math-assignment.rb"
],
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "76a45dcf02f834864ade4b2ed1ec5fd0dd0c7f76..33f478735db5f9a23c2760a55dfc3e4acbdc46f8"
}
,{
"testCaseDescription": "ruby-math-assignment-delete-test",
"expectedResult": {
"changes": {
"math-assignment.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"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
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
8
]
}
},
"summary": "Deleted the 'x' math assignment"
}
]
},
"errors": {}
},
"filePaths": [
"math-assignment.rb"
],
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "33f478735db5f9a23c2760a55dfc3e4acbdc46f8..f81054ebeafb1e11c934903a5f5bc2341f79a500"
}
,{
"testCaseDescription": "ruby-math-assignment-delete-rest-test",
"expectedResult": {
"changes": {
"math-assignment.rb": [
{
"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
]
}
},
"summary": "Deleted the 'x' math assignment"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
8
]
}
},
"summary": "Deleted the 'x' math assignment"
}
]
},
"errors": {}
},
"filePaths": [
"math-assignment.rb"
],
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "f81054ebeafb1e11c934903a5f5bc2341f79a500..6564c9c8832540d910a4118a6130305613ef9772"
}]