[JS IR BE] Improve diagnostics in tests
This commit is contained in:
@@ -115,7 +115,7 @@ abstract class BasicIrBoxTest(
|
||||
// TODO: should we do anything special for module systems?
|
||||
// TODO: return list of js from translateFiles and provide then to this function with other js files
|
||||
// TODO: cache runtime.js and don't cache kotlin.js for IR BE tests
|
||||
super.runGeneratedCode(listOf(runtimeFile.path) + jsFiles, null, null, testFunction, expectedResult, false)
|
||||
super.runGeneratedCode(listOf(runtimeFile.absolutePath) + jsFiles, null, null, testFunction, expectedResult, false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -3,5 +3,9 @@ package kotlin
|
||||
// see StdLibTestBase.removeAdHocAssertions
|
||||
|
||||
fun fail(message: String? = null): Nothing {
|
||||
throw Exception(message)
|
||||
// TODO: replace with next version when exception is supported properly
|
||||
// throw Exception(message)
|
||||
|
||||
js("throw new Error(message)")
|
||||
null!!
|
||||
}
|
||||
Reference in New Issue
Block a user