mirror of
https://github.com/github/semantic.git
synced 2024-12-27 00:44:57 +03:00
402 lines
13 KiB
JSON
402 lines
13 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-while-statement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"while-statement.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' while statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/while-statement.js b/while-statement.js",
|
|
"index e69de29..1ea2800 100644",
|
|
"--- a/while-statement.js",
|
|
"+++ b/while-statement.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+while (a) { b(); };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "0b1a50d075cdb5202c523f929502c24a9fce63ce..db921ea9f999f72cb6399c64092e4b0904628ff8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-while-statement-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"while-statement.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' while statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' while statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/while-statement.js b/while-statement.js",
|
|
"index 1ea2800..c322323 100644",
|
|
"--- a/while-statement.js",
|
|
"+++ b/while-statement.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+while (b) { a(); };",
|
|
"+while (a) { b(); };",
|
|
" while (a) { b(); };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "db921ea9f999f72cb6399c64092e4b0904628ff8..daa66677bfa5359e0679879da34e3ee1bed674a6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-while-statement-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"while-statement.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
13
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
13
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'b' identifier in the b() function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/while-statement.js b/while-statement.js",
|
|
"index c322323..ea96716 100644",
|
|
"--- a/while-statement.js",
|
|
"+++ b/while-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-while (b) { a(); };",
|
|
"+while (a) { b(); };",
|
|
" while (a) { b(); };",
|
|
" while (a) { b(); };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "daa66677bfa5359e0679879da34e3ee1bed674a6..24da8276225fa14bdffd90de951fc90cd18759ed"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-while-statement-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"while-statement.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
13
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
13
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'a' identifier in the a() function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/while-statement.js b/while-statement.js",
|
|
"index ea96716..c322323 100644",
|
|
"--- a/while-statement.js",
|
|
"+++ b/while-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-while (a) { b(); };",
|
|
"+while (b) { a(); };",
|
|
" while (a) { b(); };",
|
|
" while (a) { b(); };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "24da8276225fa14bdffd90de951fc90cd18759ed..cae263f93a9ddcbed5411b06251f41d4da9c07d4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-while-statement-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"while-statement.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' while statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' while statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' while statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/while-statement.js b/while-statement.js",
|
|
"index c322323..28f4b21 100644",
|
|
"--- a/while-statement.js",
|
|
"+++ b/while-statement.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-while (b) { a(); };",
|
|
"-while (a) { b(); };",
|
|
" while (a) { b(); };",
|
|
"+while (b) { a(); };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "cae263f93a9ddcbed5411b06251f41d4da9c07d4..09f8c3d79b360939277158f185f0e13ecbecdd11"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-while-statement-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"while-statement.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' while statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/while-statement.js b/while-statement.js",
|
|
"index 28f4b21..e185b25 100644",
|
|
"--- a/while-statement.js",
|
|
"+++ b/while-statement.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-while (a) { b(); };",
|
|
" while (b) { a(); };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "09f8c3d79b360939277158f185f0e13ecbecdd11..11144cc015f5698c8473a6efd76c3129422cf2a2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-while-statement-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"while-statement.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' while statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"while-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/while-statement.js b/while-statement.js",
|
|
"index e185b25..e69de29 100644",
|
|
"--- a/while-statement.js",
|
|
"+++ b/while-statement.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-while (b) { a(); };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "11144cc015f5698c8473a6efd76c3129422cf2a2..cd322134775da8db98f5a151ec8e2f5d9eddd3cf"
|
|
}]
|