mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
348 lines
10 KiB
JSON
348 lines
10 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-if-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.js b/if.js",
|
|
"index e69de29..52d4b4f 100644",
|
|
"--- a/if.js",
|
|
"+++ b/if.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+if (x) { log(y); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "4951403c16600a8ebe50779236bcbc480c823807..3ab04d08f09b5d896597f687046696c6cec1cf08"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-if-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a.b' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.js b/if.js",
|
|
"index 52d4b4f..ae4ee32 100644",
|
|
"--- a/if.js",
|
|
"+++ b/if.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+if (a.b) { log(c); d; }",
|
|
"+if (x) { log(y); }",
|
|
" if (x) { log(y); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "3ab04d08f09b5d896597f687046696c6cec1cf08..c5c2097ab589ca6e4187e2bae6455468ececcb93"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-if-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a.b' if statement with the 'x' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.js b/if.js",
|
|
"index ae4ee32..df55832 100644",
|
|
"--- a/if.js",
|
|
"+++ b/if.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-if (a.b) { log(c); d; }",
|
|
"+if (x) { log(y); }",
|
|
" if (x) { log(y); }",
|
|
" if (x) { log(y); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "c5c2097ab589ca6e4187e2bae6455468ececcb93..2f37518e72e7f3ea87111886870a575d8dc4369a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-if-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
24
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' if statement with the 'a.b' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.js b/if.js",
|
|
"index df55832..ae4ee32 100644",
|
|
"--- a/if.js",
|
|
"+++ b/if.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-if (x) { log(y); }",
|
|
"+if (a.b) { log(c); d; }",
|
|
" if (x) { log(y); }",
|
|
" if (x) { log(y); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "2f37518e72e7f3ea87111886870a575d8dc4369a..3eaefb1b0937e7789aac874832358df33b530310"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-if-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a.b' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' if statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a.b' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.js b/if.js",
|
|
"index ae4ee32..38b83ef 100644",
|
|
"--- a/if.js",
|
|
"+++ b/if.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-if (a.b) { log(c); d; }",
|
|
"-if (x) { log(y); }",
|
|
" if (x) { log(y); }",
|
|
"+if (a.b) { log(c); d; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "3eaefb1b0937e7789aac874832358df33b530310..0e72c4d71d418eefb3726b7e5bc0232a5aad7db6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-if-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.js b/if.js",
|
|
"index 38b83ef..f67163b 100644",
|
|
"--- a/if.js",
|
|
"+++ b/if.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-if (x) { log(y); }",
|
|
" if (a.b) { log(c); d; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "0e72c4d71d418eefb3726b7e5bc0232a5aad7db6..b81dbad2ec8358dd3e22e71cca5eea1c286769a8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-if-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"if.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a.b' if statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"if.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/if.js b/if.js",
|
|
"index f67163b..e69de29 100644",
|
|
"--- a/if.js",
|
|
"+++ b/if.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-if (a.b) { log(c); d; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b81dbad2ec8358dd3e22e71cca5eea1c286769a8..ee538d5b471190fe27f80e1defc319f36f5f9c38"
|
|
}]
|