Minor in JS backend: move testFalse and testTrue to common place

This commit is contained in:
Zalim Bashorov
2015-06-02 14:30:36 +03:00
parent ca4ce48801
commit 430a3c121d
2 changed files with 8 additions and 8 deletions
+8
View File
@@ -19,3 +19,11 @@ fun assertNotEquals<T>(illegal: T, actual: T, message: String? = null) {
fun assertTrue(actual: Boolean, message: String? = null) = assertEquals(true, actual, message)
fun assertFalse(actual: Boolean, message: String? = null) = assertEquals(false, actual, message)
fun testTrue(f: () -> Boolean) {
assertTrue(f(), f.toString())
}
fun testFalse(f: () -> Boolean) {
assertFalse(f(), f.toString())
}
@@ -16,11 +16,3 @@ object t {
object n {
fun valueOf() = 42
}
fun testTrue(f: () -> Boolean) {
assertTrue(f(), f.toString())
}
fun testFalse(f: () -> Boolean) {
assertFalse(f(), f.toString())
}