mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
468 lines
15 KiB
JSON
468 lines
15 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-class-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"class.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
87
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Foo' class"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"class.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/class.js b/class.js",
|
|
"index e69de29..8f6ae64 100644",
|
|
"--- a/class.js",
|
|
"+++ b/class.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f6dfeb42af9db740677fd60341ea39da711f7c81..f071d25d12bb0086a285449efbe5cfaeeed8e436"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-class-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"class.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
85
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Foo' class"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
87
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Foo' class"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"class.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/class.js b/class.js",
|
|
"index 8f6ae64..b509437 100644",
|
|
"--- a/class.js",
|
|
"+++ b/class.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+class Foo { static foo(a) { return a; }; bar(b) { return b; } baz(c) { return c; } }",
|
|
"+class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }",
|
|
" class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f071d25d12bb0086a285449efbe5cfaeeed8e436..ba736a07888eb4991323c035f2bf78fe1650ea56"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-class-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"class.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
20
|
|
],
|
|
"end": [
|
|
1,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
20
|
|
],
|
|
"end": [
|
|
1,
|
|
23
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo' identifier with the 'one' identifier in the 'one(a)' method of the 'Foo' class"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
42
|
|
],
|
|
"end": [
|
|
1,
|
|
62
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'two(b)' method in the Foo class"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
63
|
|
],
|
|
"end": [
|
|
1,
|
|
85
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'three(c)' method in the Foo class"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
42
|
|
],
|
|
"end": [
|
|
1,
|
|
62
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar(b)' method in the Foo class"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
63
|
|
],
|
|
"end": [
|
|
1,
|
|
83
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'baz(c)' method in the Foo class"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"class.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/class.js b/class.js",
|
|
"index b509437..c4f5c91 100644",
|
|
"--- a/class.js",
|
|
"+++ b/class.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-class Foo { static foo(a) { return a; }; bar(b) { return b; } baz(c) { return c; } }",
|
|
"+class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }",
|
|
" class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }",
|
|
" class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "ba736a07888eb4991323c035f2bf78fe1650ea56..c99d7b8dc9cff808ef1e6010caa4573ad1694d9b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-class-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"class.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
20
|
|
],
|
|
"end": [
|
|
1,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
20
|
|
],
|
|
"end": [
|
|
1,
|
|
23
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'one' identifier with the 'foo' identifier in the 'foo(a)' method of the 'Foo' class"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
42
|
|
],
|
|
"end": [
|
|
1,
|
|
62
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar(b)' method in the Foo class"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
63
|
|
],
|
|
"end": [
|
|
1,
|
|
83
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'baz(c)' method in the Foo class"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
42
|
|
],
|
|
"end": [
|
|
1,
|
|
62
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'two(b)' method in the Foo class"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
63
|
|
],
|
|
"end": [
|
|
1,
|
|
85
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'three(c)' method in the Foo class"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"class.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/class.js b/class.js",
|
|
"index c4f5c91..b509437 100644",
|
|
"--- a/class.js",
|
|
"+++ b/class.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }",
|
|
"+class Foo { static foo(a) { return a; }; bar(b) { return b; } baz(c) { return c; } }",
|
|
" class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }",
|
|
" class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "c99d7b8dc9cff808ef1e6010caa4573ad1694d9b..75a0caa880f62a0706ff723f555a9ec1f0c53c29"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-class-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"class.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
85
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Foo' class"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
87
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Foo' class"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
85
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Foo' class"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"class.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/class.js b/class.js",
|
|
"index b509437..b1ef404 100644",
|
|
"--- a/class.js",
|
|
"+++ b/class.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-class Foo { static foo(a) { return a; }; bar(b) { return b; } baz(c) { return c; } }",
|
|
"-class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }",
|
|
" class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }",
|
|
"+class Foo { static foo(a) { return a; }; bar(b) { return b; } baz(c) { return c; } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "75a0caa880f62a0706ff723f555a9ec1f0c53c29..4231a3b306d145aa37ceb879ef6f8da6221e54b8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-class-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"class.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
87
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Foo' class"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"class.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/class.js b/class.js",
|
|
"index b1ef404..2c17f72 100644",
|
|
"--- a/class.js",
|
|
"+++ b/class.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }",
|
|
" class Foo { static foo(a) { return a; }; bar(b) { return b; } baz(c) { return c; } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "4231a3b306d145aa37ceb879ef6f8da6221e54b8..d5627235989da4028cfcb15c4b1ee2bdc544fd31"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-class-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"class.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
85
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Foo' class"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"class.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/class.js b/class.js",
|
|
"index 2c17f72..e69de29 100644",
|
|
"--- a/class.js",
|
|
"+++ b/class.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-class Foo { static foo(a) { return a; }; bar(b) { return b; } baz(c) { return c; } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d5627235989da4028cfcb15c4b1ee2bdc544fd31..654a538b26c9b4c8637e6c2e4cd497c93e690310"
|
|
}]
|