1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 16:33:03 +03:00
semantic/test/corpus/diff-summaries/ruby/lambda.json

348 lines
10 KiB
JSON
Raw Normal View History

2016-10-27 19:24:28 +03:00
[{
"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 }"
],
2016-10-27 19:24:28 +03:00
"gitDir": "test/corpus/repos/ruby",
2017-01-11 00:58:40 +03:00
"shas": "45bfc111144021fc57c0cb1459ab1c22f0b60771..781156e3cf8c43297f8eedfce3804ff998faa071"
2016-10-27 19:24:28 +03:00
}
,{
"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 }"
],
2016-10-27 19:24:28 +03:00
"gitDir": "test/corpus/repos/ruby",
2017-01-11 00:58:40 +03:00
"shas": "781156e3cf8c43297f8eedfce3804ff998faa071..1564788a74cd1b97716e697a72a49c524ae9fa37"
2016-10-27 19:24:28 +03:00
}
,{
"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 }"
],
2016-10-27 19:24:28 +03:00
"gitDir": "test/corpus/repos/ruby",
2017-01-11 00:58:40 +03:00
"shas": "1564788a74cd1b97716e697a72a49c524ae9fa37..9423d02b83f2723eaa375eb00750eb631bae8498"
2016-10-27 19:24:28 +03:00
}
,{
"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 }"
],
2016-10-27 19:24:28 +03:00
"gitDir": "test/corpus/repos/ruby",
2017-01-11 00:58:40 +03:00
"shas": "9423d02b83f2723eaa375eb00750eb631bae8498..4aaaac670851a11898ed45673d0aa3b5996e903c"
2016-10-27 19:24:28 +03:00
}
,{
"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 }"
],
2016-10-27 19:24:28 +03:00
"gitDir": "test/corpus/repos/ruby",
2017-01-11 00:58:40 +03:00
"shas": "4aaaac670851a11898ed45673d0aa3b5996e903c..b169d31d86a3a2554cc730d96b35cbb3d83591f6"
2016-10-27 19:24:28 +03:00
}
,{
"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 }"
],
2016-10-27 19:24:28 +03:00
"gitDir": "test/corpus/repos/ruby",
2017-01-11 00:58:40 +03:00
"shas": "b169d31d86a3a2554cc730d96b35cbb3d83591f6..e5b150922264f6876565bb24110f2aaac13e2e26"
2016-10-27 19:24:28 +03:00
}
,{
"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 }"
],
2016-10-27 19:24:28 +03:00
"gitDir": "test/corpus/repos/ruby",
2017-01-11 00:58:40 +03:00
"shas": "e5b150922264f6876565bb24110f2aaac13e2e26..0eaabcf2392e93b57c829821f8bf710420e41daa"
2016-10-27 19:24:28 +03:00
}]