1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/ruby/math_assignment.json
2016-10-24 10:43:31 -07:00

620 lines
20 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,
2
]
}
},
"summary": "Added the 'x' identifier"
}
]
},
"errors": {
"math_assignment.rb": [
{
"span": {
"insert": {
"start": [
4,
3
],
"end": [
5,
8
]
}
},
"summary": "Added the '/= 1\nx **= 1' at line 4, column 3 - line 5, column 8"
}
]
}
},
"filePaths": [
"math_assignment.rb"
],
"sha1": "9231520dab61adad13f93bc68bf0a5450ad0703b",
"gitDir": "test/corpus/repos/ruby",
"sha2": "495588b897b8b30641488fc3a1ab23b01f7549ff"
}
,{
"testCaseDescription": "ruby-math_assignment-replacement-insert-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"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'x' identifier"
},
{
"span": {
"insert": {
"start": [
4,
3
],
"end": [
9,
4
]
}
},
"summary": "Added the '/= 1\nx **= 1\nx += 1\nx -= 1\nx *= 1\nx /' regex"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'x' identifier"
}
]
},
"errors": {
"math_assignment.rb": [
{
"span": {
"insert": {
"start": [
9,
4
],
"end": [
16,
1
]
}
},
"summary": "Added the '= 1\nx **= 1\nx += 1\nx -= 1\nx *= 1\nx /= 1\nx **= 1\n' at line 9, column 4 - line 16, column 1"
},
{
"span": {
"delete": {
"start": [
4,
3
],
"end": [
5,
8
]
}
},
"summary": "Deleted the '/= 1\nx **= 1' at line 4, column 3 - line 5, column 8"
}
]
}
},
"filePaths": [
"math_assignment.rb"
],
"sha1": "495588b897b8b30641488fc3a1ab23b01f7549ff",
"gitDir": "test/corpus/repos/ruby",
"sha2": "6939db311712c88777c98114d72b48a93ac36992"
}
,{
"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"
],
"sha1": "6939db311712c88777c98114d72b48a93ac36992",
"gitDir": "test/corpus/repos/ruby",
"sha2": "8c6b01231a0885d9782563336d143b8cc4dbf955"
}
,{
"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"
],
"sha1": "8c6b01231a0885d9782563336d143b8cc4dbf955",
"gitDir": "test/corpus/repos/ruby",
"sha2": "656a2341f431ca261a635a42ab603f364c6f3f76"
}
,{
"testCaseDescription": "ruby-math_assignment-delete-replacement-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"
},
{
"span": {
"replace": [
{
"start": [
4,
3
],
"end": [
9,
4
]
},
{
"start": [
4,
3
],
"end": [
9,
4
]
}
]
},
"summary": "Replaced the '/= 1\nx **= 1\nx += 1\nx -= 1\nx *= 1\nx /' regex with the '/= 1\nx **= 1\nx+= 2\nx -= 1\nx *= 1\nx /' regex"
}
]
},
"errors": {
"math_assignment.rb": [
{
"span": {
"insert": {
"start": [
9,
4
],
"end": [
11,
1
]
}
},
"summary": "Added the '= 1\nx **= 1\n' at line 9, column 4 - line 11, column 1"
},
{
"span": {
"delete": {
"start": [
9,
4
],
"end": [
16,
1
]
}
},
"summary": "Deleted the '= 1\nx **= 1\nx += 1\nx -= 1\nx *= 1\nx /= 1\nx **= 1\n' at line 9, column 4 - line 16, column 1"
}
]
}
},
"filePaths": [
"math_assignment.rb"
],
"sha1": "656a2341f431ca261a635a42ab603f364c6f3f76",
"gitDir": "test/corpus/repos/ruby",
"sha2": "ae3945bd209ea3f41d712e6bf7425956b42f3f32"
}
,{
"testCaseDescription": "ruby-math_assignment-delete-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"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'x' identifier"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'x' identifier"
},
{
"span": {
"delete": {
"start": [
4,
3
],
"end": [
9,
4
]
}
},
"summary": "Deleted the '/= 1\nx **= 1\nx+= 2\nx -= 1\nx *= 1\nx /' regex"
}
]
},
"errors": {
"math_assignment.rb": [
{
"span": {
"insert": {
"start": [
4,
3
],
"end": [
5,
8
]
}
},
"summary": "Added the '/= 1\nx **= 1' at line 4, column 3 - line 5, column 8"
},
{
"span": {
"delete": {
"start": [
9,
4
],
"end": [
11,
1
]
}
},
"summary": "Deleted the '= 1\nx **= 1\n' at line 9, column 4 - line 11, column 1"
}
]
}
},
"filePaths": [
"math_assignment.rb"
],
"sha1": "ae3945bd209ea3f41d712e6bf7425956b42f3f32",
"gitDir": "test/corpus/repos/ruby",
"sha2": "f2f83c8f22bc678c685fbfccf3305b4c3eca1afb"
}
,{
"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,
2
]
}
},
"summary": "Deleted the 'x' identifier"
}
]
},
"errors": {
"math_assignment.rb": [
{
"span": {
"delete": {
"start": [
4,
3
],
"end": [
5,
8
]
}
},
"summary": "Deleted the '/= 1\nx **= 1' at line 4, column 3 - line 5, column 8"
}
]
}
},
"filePaths": [
"math_assignment.rb"
],
"sha1": "f2f83c8f22bc678c685fbfccf3305b4c3eca1afb",
"gitDir": "test/corpus/repos/ruby",
"sha2": "55cae8acacbda6caa7260e265b431765e1af6265"
}]