Commit 569e69b0 authored by Him188's avatar Him188

DSL for testing

parent b50a6259
@file:Suppress("NOTHING_TO_INLINE")
package net.mamoe.mirai.test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertNotEquals
import kotlin.test.assertTrue
@DslMarker
internal annotation class TestDSL
@TestDSL
inline fun Boolean.shouldBeTrue() = assertTrue { this }
@TestDSL
inline fun Boolean.shouldBeFalse() = assertFalse { this }
@TestDSL
inline infix fun <E> E.shouldBeEqualTo(another: E) = assertEquals(another, this)
@TestDSL
inline infix fun <E> E.shouldNotBeEqualTo(another: E) = assertNotEquals(another, this)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment