Rework TestlibTest, use JUnit console runner instead of manual suite
The problem with the manually created suite was that it was created in setUp() and so a lot of the hard work (compilation, test case lookup) was happening in setUp(). If any exception is thrown in setUp(), tearDown() is not called, leaving the application (~9000+ subsequent tests) in the inconsistent state. Support JUnit 4 tests via JUnit4TestAdapter. Previously only a small number of test classes were actually run because this test was looking only for JUnit 3 testcases. Delete FilesTest#relativePath because it was testing a deprecated function and was failing if run from the project root
This commit is contained in:
@@ -588,16 +588,6 @@ class FilesTest {
|
||||
}
|
||||
}
|
||||
|
||||
@test fun relativePath() {
|
||||
val file1 = File("src")
|
||||
val file2 = File(file1, "kotlin")
|
||||
val file3 = File("test")
|
||||
|
||||
assertEquals("kotlin", file1.relativePath(file2))
|
||||
assertEquals("", file1.relativePath(file1))
|
||||
assertEquals(file3.canonicalPath, file1.relativePath(file3))
|
||||
}
|
||||
|
||||
private fun checkFileElements(f: File, root: File?, elements: List<String>) {
|
||||
var i = 0
|
||||
assertEquals(root, f.root)
|
||||
|
||||
Reference in New Issue
Block a user