Many testing frameworks include common functions for validating the state of your tests. These types of functions may include things such as the following:
- assert
- assertTrue
- assertNotNull
The kotlin.test package includes a variety of top-level functions aimed to provide similar functionality, independent of any specific testing framework. A few examples of these kotlin.test functions include the following:
- assert
- assertEquals
- assertFailsWith
- containsAll
These functions aim to provide common default functionality as a first-class supported aspect of the Kotlin core libraries.