1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
semantic/test/corpus/json/javascript/this-expression.json
2016-11-03 15:41:59 -07:00

1401 lines
48 KiB
JSON

[{
"testCaseDescription": "javascript-this-expression-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
}
],
"range": [
0,
5
]
}
],
"patch": "insert",
"range": [
0,
6
]
}
],
"hasChanges": true,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "insert",
"range": [
6,
6
]
}
],
"hasChanges": true,
"range": [
6,
6
],
"number": 2
}
]
],
"paths": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"b251f26b7af5fd0c9cbea299b7e4168fd73781f5"
]
},
"filePaths": [
"this-expression.js"
],
"patch": [
"diff --git a/this-expression.js b/this-expression.js",
"index e69de29..b251f26 100644",
"--- a/this-expression.js",
"+++ b/this-expression.js",
"@@ -0,0 +1 @@",
"+this;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "de56bb89881ee1f97c710b8447f22a479a373692..618c78bcccee5405762867606d7a27bfe59a1bc2"
}
,{
"testCaseDescription": "javascript-this-expression-replacement-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
7,
11
]
}
],
"patch": "insert",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
13,
17
]
}
],
"patch": "insert",
"range": [
13,
18
]
}
],
"range": [
13,
19
]
}
],
"hasChanges": true,
"range": [
13,
19
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": false,
"range": [
0,
6
],
"number": 1
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
19,
23
]
}
],
"range": [
19,
24
]
}
],
"range": [
19,
25
]
}
],
"hasChanges": false,
"range": [
19,
25
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
6,
6
]
}
],
"hasChanges": false,
"range": [
6,
6
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
25,
25
]
}
],
"hasChanges": false,
"range": [
25,
25
],
"number": 4
}
]
],
"paths": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"b251f26b7af5fd0c9cbea299b7e4168fd73781f5",
"5804743758fd3bd2f40d0cc9a3af06f11fc16d3f"
]
},
"filePaths": [
"this-expression.js"
],
"patch": [
"diff --git a/this-expression.js b/this-expression.js",
"index b251f26..5804743 100644",
"--- a/this-expression.js",
"+++ b/this-expression.js",
"@@ -1 +1,3 @@",
"+return this;",
"+this;",
" this;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "618c78bcccee5405762867606d7a27bfe59a1bc2..623a175dabd13a76401fa44b6a8b91e8b4b3616b"
}
,{
"testCaseDescription": "javascript-this-expression-delete-insert-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
7,
11
]
}
],
"patch": "delete",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
}
],
"patch": "insert",
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": true,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
13,
17
]
}
],
"range": [
13,
18
]
}
],
"range": [
13,
19
]
}
],
"hasChanges": false,
"range": [
13,
19
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
6,
10
]
}
],
"range": [
6,
11
]
}
],
"range": [
6,
12
]
}
],
"hasChanges": false,
"range": [
6,
12
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
19,
23
]
}
],
"range": [
19,
24
]
}
],
"range": [
19,
25
]
}
],
"hasChanges": false,
"range": [
19,
25
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
12,
16
]
}
],
"range": [
12,
17
]
}
],
"range": [
12,
18
]
}
],
"hasChanges": false,
"range": [
12,
18
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
25,
25
]
}
],
"hasChanges": false,
"range": [
25,
25
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
18,
18
]
}
],
"hasChanges": false,
"range": [
18,
18
],
"number": 4
}
]
],
"paths": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"5804743758fd3bd2f40d0cc9a3af06f11fc16d3f",
"3c82a23c6c601113ba072922e75dcd892e7629ba"
]
},
"filePaths": [
"this-expression.js"
],
"patch": [
"diff --git a/this-expression.js b/this-expression.js",
"index 5804743..3c82a23 100644",
"--- a/this-expression.js",
"+++ b/this-expression.js",
"@@ -1,3 +1,3 @@",
"-return this;",
"+this;",
" this;",
" this;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "623a175dabd13a76401fa44b6a8b91e8b4b3616b..53a0f9ff9b4ddcf86bb526f92d25948a54a90a62"
}
,{
"testCaseDescription": "javascript-this-expression-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
}
],
"patch": "delete",
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": true,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
7,
11
]
}
],
"patch": "insert",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
6,
10
]
}
],
"range": [
6,
11
]
}
],
"range": [
6,
12
]
}
],
"hasChanges": false,
"range": [
6,
12
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
13,
17
]
}
],
"range": [
13,
18
]
}
],
"range": [
13,
19
]
}
],
"hasChanges": false,
"range": [
13,
19
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
12,
16
]
}
],
"range": [
12,
17
]
}
],
"range": [
12,
18
]
}
],
"hasChanges": false,
"range": [
12,
18
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
19,
23
]
}
],
"range": [
19,
24
]
}
],
"range": [
19,
25
]
}
],
"hasChanges": false,
"range": [
19,
25
],
"number": 3
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
18,
18
]
}
],
"hasChanges": false,
"range": [
18,
18
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
25,
25
]
}
],
"hasChanges": false,
"range": [
25,
25
],
"number": 4
}
]
],
"paths": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"3c82a23c6c601113ba072922e75dcd892e7629ba",
"5804743758fd3bd2f40d0cc9a3af06f11fc16d3f"
]
},
"filePaths": [
"this-expression.js"
],
"patch": [
"diff --git a/this-expression.js b/this-expression.js",
"index 3c82a23..5804743 100644",
"--- a/this-expression.js",
"+++ b/this-expression.js",
"@@ -1,3 +1,3 @@",
"-this;",
"+return this;",
" this;",
" this;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "53a0f9ff9b4ddcf86bb526f92d25948a54a90a62..3e09935e8f8001936471b730067f5259b79fd3b2"
}
,{
"testCaseDescription": "javascript-this-expression-delete-replacement-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
7,
11
]
}
],
"patch": "delete",
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
13,
17
]
}
],
"patch": "delete",
"range": [
13,
18
]
}
],
"range": [
13,
19
]
}
],
"hasChanges": true,
"range": [
13,
19
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
19,
23
]
}
],
"range": [
19,
24
]
}
],
"range": [
19,
25
]
}
],
"hasChanges": false,
"range": [
19,
25
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
}
],
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": false,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
13,
17
]
}
],
"patch": "insert",
"range": [
6,
18
]
}
],
"range": [
6,
19
]
}
],
"hasChanges": true,
"range": [
6,
19
],
"number": 2
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
25,
25
]
}
],
"hasChanges": false,
"range": [
25,
25
],
"number": 4
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
19,
19
]
}
],
"hasChanges": false,
"range": [
19,
19
],
"number": 3
}
]
],
"paths": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"5804743758fd3bd2f40d0cc9a3af06f11fc16d3f",
"81aca892150aad969f6b99ea13aeadfc41c94abf"
]
},
"filePaths": [
"this-expression.js"
],
"patch": [
"diff --git a/this-expression.js b/this-expression.js",
"index 5804743..81aca89 100644",
"--- a/this-expression.js",
"+++ b/this-expression.js",
"@@ -1,3 +1,2 @@",
"-return this;",
"-this;",
" this;",
"+return this;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "3e09935e8f8001936471b730067f5259b79fd3b2..dd8a39e02b053fa07d0c509a2516a4e0f34ab8da"
}
,{
"testCaseDescription": "javascript-this-expression-delete-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "ExpressionStatements",
"children": [
{
"category": "Identifier",
"range": [
0,
4
]
}
],
"patch": "delete",
"range": [
0,
5
]
}
],
"range": [
0,
6
]
}
],
"hasChanges": true,
"range": [
0,
6
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
13,
17
]
}
],
"range": [
6,
18
]
}
],
"range": [
6,
19
]
}
],
"hasChanges": false,
"range": [
6,
19
],
"number": 2
},
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
7,
11
]
}
],
"range": [
0,
12
]
}
],
"range": [
0,
13
]
}
],
"hasChanges": false,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
19,
19
]
}
],
"hasChanges": false,
"range": [
19,
19
],
"number": 3
},
{
"terms": [
{
"category": "Program",
"children": [],
"range": [
13,
13
]
}
],
"hasChanges": false,
"range": [
13,
13
],
"number": 2
}
]
],
"paths": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"81aca892150aad969f6b99ea13aeadfc41c94abf",
"45c3231bf8add38010a596322993d0b138d1b1b2"
]
},
"filePaths": [
"this-expression.js"
],
"patch": [
"diff --git a/this-expression.js b/this-expression.js",
"index 81aca89..45c3231 100644",
"--- a/this-expression.js",
"+++ b/this-expression.js",
"@@ -1,2 +1 @@",
"-this;",
" return this;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "dd8a39e02b053fa07d0c509a2516a4e0f34ab8da..289ffca4faf69ef1b1c2d072bd28a22a88fe8e16"
}
,{
"testCaseDescription": "javascript-this-expression-delete-rest-test",
"expectedResult": {
"rows": [
[
{
"terms": [
{
"category": "Program",
"children": [
{
"category": "Return",
"children": [
{
"category": "Identifier",
"range": [
7,
11
]
}
],
"range": [
0,
12
]
}
],
"patch": "delete",
"range": [
0,
13
]
}
],
"hasChanges": true,
"range": [
0,
13
],
"number": 1
}
],
[
{
"terms": [
{
"category": "Program",
"children": [],
"patch": "delete",
"range": [
13,
13
]
}
],
"hasChanges": true,
"range": [
13,
13
],
"number": 2
}
]
],
"paths": [
"this-expression.js",
"this-expression.js"
],
"oids": [
"45c3231bf8add38010a596322993d0b138d1b1b2",
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
]
},
"filePaths": [
"this-expression.js"
],
"patch": [
"diff --git a/this-expression.js b/this-expression.js",
"index 45c3231..e69de29 100644",
"--- a/this-expression.js",
"+++ b/this-expression.js",
"@@ -1 +0,0 @@",
"-return this;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "289ffca4faf69ef1b1c2d072bd28a22a88fe8e16..32100dbe7cbc819422359a14ab7495be3254310f"
}]