square / anvil

A Kotlin compiler plugin to make dependency injection with Dagger 2 easier.
Apache License 2.0
1.29k stars 75 forks source link

Default to asserting that `exitCode == OK` in all internal tests #952

Closed RBusarow closed 2 months ago

RBusarow commented 3 months ago

The published AnvilCompilation logic gets a new expectExitCode: ExitCode? = null parameter. If a value is specified, the assertion is done before executing the block lambda.

In our internal delegating compile(...) functions, the parameter becomes non-nullable and defaults to ExitCode.OK.

This is done in follow-up to this comment.