1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/ruby/lambda.json
2016-12-06 08:22:02 -08:00

348 lines
10 KiB
JSON

[{
"testCaseDescription": "ruby-lambda-insert-test",
"expectedResult": {
"changes": {
"lambda.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
15
]
}
},
"summary": "Added an anonymous() function"
}
]
},
"errors": {}
},
"filePaths": [
"lambda.rb"
],
"patch": [
"diff --git a/lambda.rb b/lambda.rb",
"index e69de29..943ace3 100644",
"--- a/lambda.rb",
"+++ b/lambda.rb",
"@@ -0,0 +1 @@",
"+lambda { foo }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "18022ae6ebbe9a88b3eaf0cfa0654e8f8bc5dd01..3056cfc87793da5967931201f46bc12dc4186bf5"
}
,{
"testCaseDescription": "ruby-lambda-replacement-insert-test",
"expectedResult": {
"changes": {
"lambda.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
21
]
}
},
"summary": "Added an anonymous(x) function"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
15
]
}
},
"summary": "Added an anonymous() function"
}
]
},
"errors": {}
},
"filePaths": [
"lambda.rb"
],
"patch": [
"diff --git a/lambda.rb b/lambda.rb",
"index 943ace3..cb843af 100644",
"--- a/lambda.rb",
"+++ b/lambda.rb",
"@@ -1 +1,3 @@",
"+lambda { |x| x + 1 }",
"+lambda { foo }",
" lambda { foo }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "3056cfc87793da5967931201f46bc12dc4186bf5..a33da9171f4f363df081fa60a58279175ea6bbc7"
}
,{
"testCaseDescription": "ruby-lambda-delete-insert-test",
"expectedResult": {
"changes": {
"lambda.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
21
]
},
{
"start": [
1,
1
],
"end": [
1,
15
]
}
]
},
"summary": "Replaced an anonymous(x) function with an anonymous() function"
}
]
},
"errors": {}
},
"filePaths": [
"lambda.rb"
],
"patch": [
"diff --git a/lambda.rb b/lambda.rb",
"index cb843af..447bfb7 100644",
"--- a/lambda.rb",
"+++ b/lambda.rb",
"@@ -1,3 +1,3 @@",
"-lambda { |x| x + 1 }",
"+lambda { foo }",
" lambda { foo }",
" lambda { foo }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "a33da9171f4f363df081fa60a58279175ea6bbc7..e52658a62a6c3953d8382d0296c267b2a9a3b3dc"
}
,{
"testCaseDescription": "ruby-lambda-replacement-test",
"expectedResult": {
"changes": {
"lambda.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
15
]
},
{
"start": [
1,
1
],
"end": [
1,
21
]
}
]
},
"summary": "Replaced an anonymous() function with an anonymous(x) function"
}
]
},
"errors": {}
},
"filePaths": [
"lambda.rb"
],
"patch": [
"diff --git a/lambda.rb b/lambda.rb",
"index 447bfb7..cb843af 100644",
"--- a/lambda.rb",
"+++ b/lambda.rb",
"@@ -1,3 +1,3 @@",
"-lambda { foo }",
"+lambda { |x| x + 1 }",
" lambda { foo }",
" lambda { foo }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "e52658a62a6c3953d8382d0296c267b2a9a3b3dc..522cd601966aa3e9f5fc0f033f81cbefcd706669"
}
,{
"testCaseDescription": "ruby-lambda-delete-replacement-test",
"expectedResult": {
"changes": {
"lambda.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
21
]
}
},
"summary": "Deleted an anonymous(x) function"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
15
]
}
},
"summary": "Deleted an anonymous() function"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
21
]
}
},
"summary": "Added an anonymous(x) function"
}
]
},
"errors": {}
},
"filePaths": [
"lambda.rb"
],
"patch": [
"diff --git a/lambda.rb b/lambda.rb",
"index cb843af..4ebf1f8 100644",
"--- a/lambda.rb",
"+++ b/lambda.rb",
"@@ -1,3 +1,2 @@",
"-lambda { |x| x + 1 }",
"-lambda { foo }",
" lambda { foo }",
"+lambda { |x| x + 1 }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "522cd601966aa3e9f5fc0f033f81cbefcd706669..1f004455547e75075f1c16f62433c080571f69ae"
}
,{
"testCaseDescription": "ruby-lambda-delete-test",
"expectedResult": {
"changes": {
"lambda.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
15
]
}
},
"summary": "Deleted an anonymous() function"
}
]
},
"errors": {}
},
"filePaths": [
"lambda.rb"
],
"patch": [
"diff --git a/lambda.rb b/lambda.rb",
"index 4ebf1f8..dfe1b8b 100644",
"--- a/lambda.rb",
"+++ b/lambda.rb",
"@@ -1,2 +1 @@",
"-lambda { foo }",
" lambda { |x| x + 1 }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "1f004455547e75075f1c16f62433c080571f69ae..fb578efc5242fd49d72fc4e06e75adf0320ef31d"
}
,{
"testCaseDescription": "ruby-lambda-delete-rest-test",
"expectedResult": {
"changes": {
"lambda.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
21
]
}
},
"summary": "Deleted an anonymous(x) function"
}
]
},
"errors": {}
},
"filePaths": [
"lambda.rb"
],
"patch": [
"diff --git a/lambda.rb b/lambda.rb",
"index dfe1b8b..e69de29 100644",
"--- a/lambda.rb",
"+++ b/lambda.rb",
"@@ -1 +0,0 @@",
"-lambda { |x| x + 1 }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "fb578efc5242fd49d72fc4e06e75adf0320ef31d..b8e7a4d5034214328f3391e3c6001076f5bb6ec9"
}]