← Docs
kotlin.test / kotlin.test / expect

expect

Common
JVM
JS
Native
1.0
inline fun < T > expect ( expected : T , block : ( ) -> T ) : Unit
(source)

Asserts that given function block returns the given expected value.

Common
JVM
JS
Native
1.0
inline fun < T > expect (
expected : T ,
message : String ? ,
block : ( ) -> T
) : Unit

(source)

Asserts that given function block returns the given expected value and use the given message if it fails.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .