-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
158 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"version": "deb58a3", | ||
"version": "bd1a05d", | ||
"resolveLibs": "scoped" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import refactor.TestEditableDocument; | ||
import utest.Assert; | ||
import utest.Async; | ||
import utest.ITest; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package refactor; | ||
|
||
class PackageTest extends TestBase { | ||
function setupClass() { | ||
setupTestSources(["testcases/packages"]); | ||
} | ||
|
||
public function testRenameTypesModul(async:Async) { | ||
var edits:Array<TestEdit> = [ | ||
makeReplaceTestEdit("testcases/packages/Main.hx", "packages.sub.Types.Type3", 53, 73), | ||
makeReplaceTestEdit("testcases/packages/Main.hx", "packages.sub.Types", 82, 96), | ||
makeReplaceTestEdit("testcases/packages/Main.hx", "packages.sub.Type1", 289, 303), | ||
makeMoveTestEdit("testcases/packages/Types.hx", "testcases/packages/sub/Types.hx"), | ||
makeReplaceTestEdit("testcases/packages/Types.hx", "packages.sub", 8, 16), | ||
|
||
]; | ||
refactorAndCheck({fileName: "testcases/packages/Types.hx", toName: "packages.sub", pos: 12}, edits, async); | ||
} | ||
|
||
public function testRenameMoreTypesModul(async:Async) { | ||
var edits:Array<TestEdit> = [ | ||
makeReplaceTestEdit("testcases/packages/Main.hx", "packages.sub.MoreTypes", 26, 44), | ||
makeMoveTestEdit("testcases/packages/MoreTypes.hx", "testcases/packages/sub/MoreTypes.hx"), | ||
makeReplaceTestEdit("testcases/packages/MoreTypes.hx", "packages.sub", 8, 16), | ||
]; | ||
refactorAndCheck({fileName: "testcases/packages/MoreTypes.hx", toName: "packages.sub", pos: 12}, edits, async); | ||
} | ||
|
||
public function testRenameOtherTypesModul(async:Async) { | ||
var edits:Array<TestEdit> = [ | ||
makeInsertTestEdit("testcases/packages/Main.hx", "import packages.sub.OtherTypes;\n", 19), | ||
makeReplaceTestEdit("testcases/packages/Main.hx", "packages.sub.OtherTypes", 202, 221), | ||
makeReplaceTestEdit("testcases/packages/Main.hx", "packages.sub.OtherTypes.OtherTypeA", 240, 270), | ||
makeMoveTestEdit("testcases/packages/OtherTypes.hx", "testcases/packages/sub/OtherTypes.hx"), | ||
makeReplaceTestEdit("testcases/packages/OtherTypes.hx", "packages.sub", 8, 16), | ||
]; | ||
refactorAndCheck({fileName: "testcases/packages/OtherTypes.hx", toName: "packages.sub", pos: 12}, edits, async); | ||
} | ||
|
||
public function testRenameHelperTypesModul(async:Async) { | ||
var edits:Array<TestEdit> = [ | ||
makeMoveTestEdit("testcases/packages/HelperTypes.hx", "testcases/packages/sub/HelperTypes.hx"), | ||
makeReplaceTestEdit("testcases/packages/HelperTypes.hx", "packages.sub", 8, 16), | ||
makeReplaceTestEdit("testcases/packages/import.hx", "packages.sub.HelperTypes", 26, 46), | ||
]; | ||
refactorAndCheck({fileName: "testcases/packages/HelperTypes.hx", toName: "packages.sub", pos: 12}, edits, async); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package packages; | ||
|
||
typedef HelperTypeA = {} | ||
typedef HelperTypeB = {} | ||
typedef HelperTypeC = {} | ||
typedef HelperTypes = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package packages; | ||
|
||
import packages.MoreTypes; | ||
import packages.Types.Type3; | ||
import packages.Types; | ||
|
||
class Main { | ||
static function main() { | ||
var test:Type1 = {}; | ||
var test2:OtherTypes = {}; | ||
var test3:packages.OtherTypes = {}; | ||
var test4:packages.OtherTypes.OtherTypeA = {}; | ||
var test5:packages.Type1 = {}; | ||
var test6:HelperTypes; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package packages; | ||
|
||
typedef TypeA = {} | ||
typedef TypeB = {} | ||
typedef TypeC = {} | ||
typedef MoreTypes = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package packages; | ||
|
||
typedef OtherTypeA = {} | ||
typedef OtherTypeB = {} | ||
typedef OtherTypeC = {} | ||
typedef OtherTypes = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package packages; | ||
|
||
typedef Type1 = {} | ||
typedef Type2 = {} | ||
typedef Type3 = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package packages; | ||
|
||
import packages.HelperTypes; |