mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
745 lines
23 KiB
JSON
745 lines
23 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' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator 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": "1965f9bdeebab8468bebb4f2c29230d3a42c255e..7c9d58241d4b18ce09a2b955af2bafa7c74982c0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-math-assignment-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"math-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
1
|
|
],
|
|
"end": [
|
|
9,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
10,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator 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": "7c9d58241d4b18ce09a2b955af2bafa7c74982c0..77f634748f5b464e65820506739bcc6a626d81b9"
|
|
}
|
|
,{
|
|
"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 operator 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": "77f634748f5b464e65820506739bcc6a626d81b9..6440a1a1d8cc18d572ea627cb86b9be3f4dc5fa4"
|
|
}
|
|
,{
|
|
"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 operator 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": "6440a1a1d8cc18d572ea627cb86b9be3f4dc5fa4..68a0167bd4f2dc5c50eef89de25c6f8756a5f101"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-math-assignment-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"math-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' operator 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": "68a0167bd4f2dc5c50eef89de25c6f8756a5f101..f2ef306509a3a836a1c92fe0a1424d07689f6ed8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-math-assignment-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"math-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator 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": "f2ef306509a3a836a1c92fe0a1424d07689f6ed8..baf89bf25b9b1f5ce42086e5175f7803db41fce6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-math-assignment-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"math-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' operator 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": "baf89bf25b9b1f5ce42086e5175f7803db41fce6..bba90b67e00732e5f4f32a72f7b6b131d33dd30e"
|
|
}]
|