[JS IR BE] Improve diagnostics in tests

This commit is contained in:
Zalim Bashorov
2018-07-25 14:41:01 +03:00
parent 2fb286e39c
commit 8d97512179
2 changed files with 6 additions and 2 deletions
@@ -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
View File
@@ -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!!
}