What is the Power-assert compiler plugin?
masterThe Kotlin Power-assert compiler plugin improves the debugging experience by providing detailed failure messages with contextual information. When an assertion fails, the plugin automatically generates a message that displays the values of variables and sub-expressions involved in the assertion, helping you understand why a test failed without needing complex assertion libraries.
Key Features:
- Enhanced error messages: Captures and displays values of variables and sub-expressions.
- Runtime library: Provides the
@PowerAssertannotation andCallExplanationclass for integration. - Support for multiple functions: Transforms
assert()by default, but can be configured to transformrequire(),check(),assertTrue(), etc.